Bug 16901 - Security problem in the FTP URL for obtaining QLogic Fibre Channel HBA firmware
Summary: Security problem in the FTP URL for obtaining QLogic Fibre Channel HBA firmware
Status: CLOSED OBSOLETE
Alias: None
Product: SCSI Drivers
Classification: Unclassified
Component: QLOGIC QLA2XXX (show other bugs)
Hardware: All Linux
: P1 high
Assignee: scsi_drivers-qla2xxx
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-24 13:31 UTC by Plamen Tonev
Modified: 2012-05-12 16:13 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.35.3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Proof that firmware files can be replaces with malicious ones (124.29 KB, image/jpeg)
2010-08-24 13:31 UTC, Plamen Tonev
Details

Description Plamen Tonev 2010-08-24 13:31:27 UTC
Created attachment 27801 [details]
Proof that firmware files can be replaces with malicious ones

The qla2xxx driver in the latest stable 2.6.35.3 prints dangerous URL (ftp.qlogic.com) for obtaining new firmware for their adapters.

From: linux-2.6.35.3/drivers/scsi/qla2xxx/qla_init.c
---- quote -----
#define QLA_FW_URL "ftp://ftp.qlogic.com/outgoing/linux/firmware/"

int
qla2x00_load_risc(scsi_qla_host_t *vha, uint32_t *srisc_addr)
{
        int     rval;
        int     i, fragment;
        uint16_t *wcode, *fwcode;
        uint32_t risc_addr, risc_size, fwclen, wlen, *seg;
        struct fw_blob *blob;
        struct qla_hw_data *ha = vha->hw;
        struct req_que *req = ha->req_q_map[0];

        /* Load firmware blob. */
        blob = qla2x00_request_firmware(vha);
        if (!blob) {
                qla_printk(KERN_ERR, ha, "Firmware image unavailable.\n");
                qla_printk(KERN_ERR, ha, "Firmware images can be retrieved "
                    "from: " QLA_FW_URL ".\n");
                return QLA_FUNCTION_FAILED;
        }

---- end quote -----

  It is dangerous to give the users this URL for obtaining new firmware images, because this QLogic FTP site isn't secure at all and everyone anonymously can exchange the original firmware .bin files with their own files.
The outgoing/linux/firmware folder is read-only and files cannot be replaced, or created new ones. The folder itself cannot be renamed too, but everyone can rename linux folder to linux2 for example, then create a new linux folder with firmware inside and put their own files instead of the 'official' ones from QLogic.
  It can be done easy and you can see the attached screenshot for proof.
Until better security is implemented on this FTP (or better place for storing firmware releases is found) I recommend to print a warning to all users of this driver about security problems with the QLogic FTP site.
Comment 1 Andrew Vasquez 2010-08-24 16:20:56 UTC
Thank you for bringing this to our attention.  We've notified the IT group to have these permission problems with the files and directories addressed.

Note You need to log in before you can comment on or make changes to this bug.