[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BL0PR11MB3122C204A8FD85F7FFF839CFBD8FA@BL0PR11MB3122.namprd11.prod.outlook.com>
Date: Mon, 11 Dec 2023 04:55:27 +0000
From: "Pucha, HimasekharX Reddy" <himasekharx.reddy.pucha@...el.com>
To: mschmidt <mschmidt@...hat.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>
CC: "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, "Greenwalt, Paul"
<paul.greenwalt@...el.com>, "intel-wired-lan@...ts.osuosl.org"
<intel-wired-lan@...ts.osuosl.org>, "Brandeburg, Jesse"
<jesse.brandeburg@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH net] ice: fix theoretical out-of-bounds
access in ethtool link modes
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Michal Schmidt
> Sent: Thursday, November 30, 2023 10:28 PM
> To: netdev@...r.kernel.org
> Cc: Nguyen, Anthony L <anthony.l.nguyen@...el.com>; Greenwalt, Paul <paul.greenwalt@...el.com>; intel-wired-lan@...ts.osuosl.org; Brandeburg, Jesse <jesse.brandeburg@...el.com>
> Subject: [Intel-wired-lan] [PATCH net] ice: fix theoretical out-of-bounds access in ethtool link modes
>
> To map phy types reported by the hardware to ethtool link mode bits,
> ice uses two lookup tables (phy_type_low_lkup, phy_type_high_lkup).
> The "low" table has 64 elements to cover every possible bit the hardware
> may report, but the "high" table has only 13. If the hardware reports a
> higher bit in phy_types_high, the driver would access memory beyond the
> lookup table's end.
>
> Instead of iterating through all 64 bits of phy_types_{low,high}, use
> the sizes of the respective lookup tables.
>
> Fixes: 9136e1f1e5c3 ("ice: refactor PHY type to ethtool link mode")
> Signed-off-by: Michal Schmidt <mschmidt@...hat.com>
> ---
> drivers/net/ethernet/intel/ice/ice_ethtool.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com> (A Contingent worker at Intel)
Powered by blists - more mailing lists