summaryrefslogtreecommitdiff
path: root/include/linux/tc_act/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorNicholas Carlini <nicholas@carlini.com>2026-03-27 02:18:23 +0000
committerJens Axboe <axboe@kernel.dk>2026-03-26 20:28:28 -0600
commit5170efd9c344c68a8075dcb8ed38d3f8a60e7ed4 (patch)
tree20f6e1cf42029b27502e1a1c857a06af13945e28 /include/linux/tc_act/git@git.tavy.me:linux.git
parentb59efde9e6c122207c16169d3d0deb623956eae9 (diff)
io_uring/fdinfo: fix OOB read in SQE_MIXED wrap check
__io_uring_show_fdinfo() iterates over pending SQEs and, for 128-byte SQEs on an IORING_SETUP_SQE_MIXED ring, needs to detect when the second half of the SQE would be past the end of the sq_sqes array. The current check tests (++sq_head & sq_mask) == 0, but sq_head is only incremented when a 128-byte SQE is encountered, not on every iteration. The actual array index is sq_idx = (i + sq_head) & sq_mask, which can be sq_mask (the last slot) while the wrap check passes. Fix by checking sq_idx directly. Keep the sq_head increment so the loop still skips the second half of the 128-byte SQE on the next iteration. Fixes: 1cba30bf9fdd ("io_uring: add support for IORING_SETUP_SQE_MIXED") Signed-off-by: Nicholas Carlini <nicholas@carlini.com> Link: https://patch.msgid.link/20260327021823.3138396-1-nicholas@carlini.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/tc_act/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions