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]
Message-ID: <252dcb38-59fa-fa20-be59-26964b900349@canonical.com>
Date:   Sat, 16 Feb 2019 14:26:37 +0000
From:   Colin Ian King <colin.king@...onical.com>
To:     Dirk Brandewie <dirk.j.brandewie@...el.com>,
        Jeff Pieper <jeffrey.e.pieper@...el.com>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:     "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: phy speed setting issue: e1000: Add support for the CE4100 reference
 platform

Hi,

Static analysis from CoverityScan has detected an issue with the speed
setup with the control setting in the e1000 driver.

Function e1000_config_mac_to_phy in
/drivers/net/ethernet/intel/e1000/e1000_hw.c, CoverityScan reports:

CID 140032 (#1 of 1): Operands don't affect result
(CONSTANT_EXPRESSION_RESULT)

result_independent_of_operands: phy_data & 0x200000 is always 0
regardless of the values of its operands. This occurs as the logical
operand of if.

1936                if (phy_data & RTL_PHY_CTRL_SPD_100)
1937                        ctrl |= E1000_CTRL_SPD_100;
1938                else
1939                        ctrl |= E1000_CTRL_SPD_10;


phy_data is a u16 however the 100 mbit speed bitmask is 0x200000, hence
the bitwise with phy_data will always result in zero, and so the ctrl is
never set to E1000_CTRL_SPD_100.

I'm not familiar with this hardware, so I'm not sure what appropriate
mask should be.

Issue was introduced with commit: 5377a4160bb6 ("e1000: Add support for
the CE4100 reference platform")

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ