summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorPeter Seiderer <ps.report@gmx.net>2025-03-17 12:04:00 +0300
committerJakub Kicinski <kuba@kernel.org>2025-03-24 22:01:37 +0300
commit7151062c297cc500d2a3b3723c83ff15f65332b4 (patch)
tree0a78e983548a69dc36caf48901faa308d04a2262 /net/unix/af_unix.c
parentfd88253605a49034c39b61e1092b52c9f53254e5 (diff)
downloadlinux-7151062c297cc500d2a3b3723c83ff15f65332b4.tar.xz
net: pktgen: add strict buffer parsing index check
Add strict buffer parsing index check to avoid the following Smatch warning: net/core/pktgen.c:877 get_imix_entries() warn: check that incremented offset 'i' is capped Checking the buffer index i after every get_user/i++ step and returning with error code immediately avoids the current indirect (but correct) error handling. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/netdev/36cf3ee2-38b1-47e5-a42a-363efeb0ace3@stanley.mountain/ Signed-off-by: Peter Seiderer <ps.report@gmx.net> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250317090401.1240704-1-ps.report@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions