Skip to content

Commit 92c75f7

Browse files
committed
Revert "io_uring: don't take fs for recvmsg/sendmsg"
This reverts commit 10cad2c. Petr reports that with this commit in place, io_uring fails the chroot test (CVE-202-29373). We do need to retain ->fs for send/recvmsg, so revert this commit. Reported-by: Petr Vorel <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent aec18a5 commit 92c75f7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fs/io_uring.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,8 @@ static const struct io_op_def io_op_defs[] = {
857857
.pollout = 1,
858858
.needs_async_data = 1,
859859
.async_size = sizeof(struct io_async_msghdr),
860-
.work_flags = IO_WQ_WORK_MM | IO_WQ_WORK_BLKCG,
860+
.work_flags = IO_WQ_WORK_MM | IO_WQ_WORK_BLKCG |
861+
IO_WQ_WORK_FS,
861862
},
862863
[IORING_OP_RECVMSG] = {
863864
.needs_file = 1,
@@ -866,7 +867,8 @@ static const struct io_op_def io_op_defs[] = {
866867
.buffer_select = 1,
867868
.needs_async_data = 1,
868869
.async_size = sizeof(struct io_async_msghdr),
869-
.work_flags = IO_WQ_WORK_MM | IO_WQ_WORK_BLKCG,
870+
.work_flags = IO_WQ_WORK_MM | IO_WQ_WORK_BLKCG |
871+
IO_WQ_WORK_FS,
870872
},
871873
[IORING_OP_TIMEOUT] = {
872874
.needs_async_data = 1,

0 commit comments

Comments
 (0)