aboutsummaryrefslogtreecommitdiffstats
path: root/tools/net/ynl/generated/devlink-user.c
diff options
context:
space:
mode:
authorElena Salomatkina <[email protected]>2023-11-24 21:08:02 +0000
committerPaolo Abeni <[email protected]>2023-11-28 09:43:37 +0000
commitad31c629ca3c87f6d557488c1f9faaebfbcd203c (patch)
tree101b0e32d2da01aab68877d27a83711975557ffd /tools/net/ynl/generated/devlink-user.c
parentMerge branch 'selftests-net-fix-a-few-small-compiler-warnings' (diff)
downloadkernel-ad31c629ca3c87f6d557488c1f9faaebfbcd203c.tar.gz
kernel-ad31c629ca3c87f6d557488c1f9faaebfbcd203c.zip
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/net/ynl/generated/devlink-user.c')
0 files changed, 0 insertions, 0 deletions