diff options
author | Elena Salomatkina <[email protected]> | 2023-11-25 00:08:02 +0300 |
---|---|---|
committer | Paolo Abeni <[email protected]> | 2023-11-28 10:43:37 +0100 |
commit | ad31c629ca3c87f6d557488c1f9faaebfbcd203c (patch) | |
tree | 101b0e32d2da01aab68877d27a83711975557ffd /tools/perf/scripts | |
parent | ec2610b129b49fd3ba0fbbf1fe988774a1af4a2a (diff) |
octeontx2-af: Fix possible buffer overflow
A loop in rvu_mbox_handler_nix_bandprof_free() contains
a break if (idx == MAX_BANDPROF_PER_PFFUNC),
but if idx may reach MAX_BANDPROF_PER_PFFUNC
buffer '(*req->prof_idx)[layer]' overflow happens before that check.
The patch moves the break to the
beginning of the loop.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: e8e095b3b370 ("octeontx2-af: cn10k: Bandwidth profiles config support").
Signed-off-by: Elena Salomatkina <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Subbaraya Sundeep <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions