]> Gentwo Git Trees - linux/.git/commit
io_uring/fdinfo: validate opcode before checking if it's an 128b one
authorJens Axboe <axboe@kernel.dk>
Thu, 30 Oct 2025 23:02:13 +0000 (17:02 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 30 Oct 2025 23:09:00 +0000 (17:09 -0600)
commit8cd5a59e4d512c6e1df47bf8ce60f7d16e4b3c18
tree92a1db2d44ec14037c404be91f8d65f23a705b9f
parent101e596e7404d07a85b38358a392009503aad797
io_uring/fdinfo: validate opcode before checking if it's an 128b one

The mixed SQE support assumes that userspace always passes valid data,
that is not the case. Validate the opcode properly before indexing
the io_issue_defs[] array, and pass it through the nospec indexing
as well as it's a user valid indexing a kernel array.

Fixes: 1cba30bf9fdd ("io_uring: add support for IORING_SETUP_SQE_MIXED")
Reported-by: syzbot+b883b008a0b1067d5833@syzkaller.appspotmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/fdinfo.c