Skip to content

Commit 4079a38

Browse files
committed
Merge tag 'io_uring-6.19-20251226' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull io_uring fix from Jens Axboe: "Just a single fix for a bug that can cause a leak of the filename with IORING_OP_OPENAT, if direct descriptors are asked for and O_CLOEXEC has been set in the request flags" * tag 'io_uring-6.19-20251226' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: io_uring: fix filename leak in __io_openat_prep()
2 parents 8f0cbed + b14fad5 commit 4079a38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/openclose.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ static int __io_openat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe
7373
open->filename = NULL;
7474
return ret;
7575
}
76+
req->flags |= REQ_F_NEED_CLEANUP;
7677

7778
open->file_slot = READ_ONCE(sqe->file_index);
7879
if (open->file_slot && (open->how.flags & O_CLOEXEC))
7980
return -EINVAL;
8081

8182
open->nofile = rlimit(RLIMIT_NOFILE);
82-
req->flags |= REQ_F_NEED_CLEANUP;
8383
if (io_openat_force_async(open))
8484
req->flags |= REQ_F_FORCE_ASYNC;
8585
return 0;

0 commit comments

Comments
 (0)