lkml.org 
[lkml]   [2022]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [EXT] [PATCH v2] net: atlantic: Avoid out-of-bounds indexing
From


> UBSAN warnings are observed on atlantic driver:
> [ 294.432996] UBSAN: array-index-out-of-bounds in
> /build/linux-Qow4fL/linux-5.15.0/drivers/net/ethernet/aquantia/atlantic/aq
> _nic.c:484:48
> [ 294.433695] index 8 is out of range for type 'aq_vec_s *[8]'
>
> The ring is dereferenced right before breaking out the loop, to prevent
> that from happening, only use the index in the loop to fix the issue.

Thanks,

Reviewed-by: Igor Russkikh <irusskikh@marvell.com>

Igor

\
 
 \ /
  Last update: 2022-04-08 16:40    [W:0.394 / U:0.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site