diff options
author | Kai-Heng Feng <kai.heng.feng@canonical.com> | 2022-04-08 05:22:04 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-04-09 06:34:31 +0300 |
commit | 8d3a6c37d50d5a0504c126c932cc749e6dd9c78f (patch) | |
tree | 578c87f63caa560a8c502890d40a90443a271ec9 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | e6934e4048c91502efcb21da92b7ae37cd8fa741 (diff) | |
download | linux-8d3a6c37d50d5a0504c126c932cc749e6dd9c78f.tar.xz |
net: atlantic: Avoid out-of-bounds indexing
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.
BugLink: https://bugs.launchpad.net/bugs/1958770
Tested-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Reviewed-by: Igor Russkikh <irusskikh@marvell.com>
Link: https://lore.kernel.org/r/20220408022204.16815-1-kai.heng.feng@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions