[Intel-wired-lan] [PATCH intel-net] ice: fix NULL pointer dereference in ice_update_vsi_tx_ring_stats()

G, GurucharanX gurucharanx.g at intel.com
Mon Mar 14 04:46:44 UTC 2022



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Maciej Fijalkowski
> Sent: Monday, March 7, 2022 11:18 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: netdev at vger.kernel.org; dan.carpenter at oracle.com; kuba at kernel.org;
> bpf at vger.kernel.org; davem at davemloft.net; Karlsson, Magnus
> <magnus.karlsson at intel.com>
> Subject: [Intel-wired-lan] [PATCH intel-net] ice: fix NULL pointer dereference
> in ice_update_vsi_tx_ring_stats()
> 
> It is possible to do NULL pointer dereference in routine that updates Tx ring
> stats. Currently only stats and bytes are updated when ring pointer is valid,
> but later on ring is accessed to propagate gathered Tx stats onto VSI stats.
> 
> Change the existing logic to move to next ring when ring is NULL.
> 
> Fixes: e72bba21355d ("ice: split ice_ring onto Tx/Rx separate structs")
> Reported-by: kernel test robot <lkp at intel.com>
> Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski at intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_main.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 

Tested-by: Gurucharan <gurucharanx.g at intel.com> (A Contingent worker at Intel)


More information about the Intel-wired-lan mailing list