[Bug 49461] scsi/bfa/bfad.c:1037: possible off by one in strncpy ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=49461

Jeff Zhou <jz.researcher@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jz.researcher@xxxxxxxxx

--- Comment #1 from Jeff Zhou <jz.researcher@xxxxxxxxx> ---
In 3.10.9, it is correct:
scsi/bfa/bfad.c : 1036
    strncpy(driver_info.os_device_name, bfad->pci_name,
        sizeof(driver_info.os_device_name) - 1);

scsi/bfa/bfad.c : 1014    
struct bfa_fcs_driver_info_s driver_info;

scsi/bfa/bfa_fcs.h : 672
struct bfa_fcs_driver_info_s {
    u8     version[BFA_VERSION_LEN];        /* Driver Version */
    u8     host_machine_name[BFA_FCS_OS_STR_LEN];
    u8     host_os_name[BFA_FCS_OS_STR_LEN]; /* OS name and version */
    u8     host_os_patch[BFA_FCS_OS_STR_LEN]; /* patch or service pack */
    u8     os_device_name[BFA_FCS_OS_STR_LEN]; /* Driver Device Name */
};

The copy length here is (BFA_FCS_OS_STR_LEN - 1), which should be.

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux