lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 15 Jan 2017 13:03:45 +0100
From:   Nicolas Iooss <nicolas.iooss_linux@....org>
To:     Dept-GELinuxNICDev@...ium.com, netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org
Subject: qla3xxx: u32 constant overflow in fm93c56a_select()

Hello,

In drivers/net/ethernet/qlogic/qla3xxx.c, fm93c56a_select() currently calls:

  ql_write_nvram_reg(qdev, spir,
    ((ISP_NVRAM_MASK << 16) | qdev->eeprom_cmd_data));

and ISP_NVRAM_MASK is defined as (0x000F << 16).

ql_write_nvram_reg() writes a 32-bit value but (ISP_NVRAM_MASK << 16)
expands to ((0x000F << 16) << 16) = 0xF << 32, which overflows the u32
type. This means the above call is equivalent to:

  ql_write_nvram_reg(qdev, spir, qdev->eeprom_cmd_data);

Is this something normal, in which case (ISP_NVRAM_MASK << 16) would be
removed, or a bug?

Thanks,
Nicolas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ