Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/rsrc: check size when importing reg buffer

We're relying on callers to verify the IO size, do it inside of
io_import_fixed() instead. It's safer, easier to deal with, and more
consistent as now it's done close to the iter init site.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/f9c2c75ec4d356a0c61289073f68d98e8a9db190.1743446271.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Pavel Begunkov and committed by
Jens Axboe
a1fbe0a1 ed344511

+2
+2
io_uring/rsrc.c
··· 1016 1016 /* not inside the mapped region */ 1017 1017 if (unlikely(buf_addr < imu->ubuf || buf_end > (imu->ubuf + imu->len))) 1018 1018 return -EFAULT; 1019 + if (unlikely(len > MAX_RW_COUNT)) 1020 + return -EFAULT; 1019 1021 if (!(imu->dir & (1 << ddir))) 1020 1022 return -EFAULT; 1021 1023