Skip to content

Commit cced1c5

Browse files
committed
Merge tag 'io_uring-6.8-2024-01-26' of git://git.kernel.dk/linux
Pull io_uring fix from Jens Axboe: "Just a single tweak to the newly added IORING_OP_FIXED_FD_INSTALL from Paul, ensuring it goes via the audit path and playing it safe by excluding it from using registered creds" * tag 'io_uring-6.8-2024-01-26' of git://git.kernel.dk/linux: io_uring: enable audit and restrict cred override for IORING_OP_FIXED_FD_INSTALL
2 parents 667c889 + 16bae3e commit cced1c5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

io_uring/opdef.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,6 @@ const struct io_issue_def io_issue_defs[] = {
471471
},
472472
[IORING_OP_FIXED_FD_INSTALL] = {
473473
.needs_file = 1,
474-
.audit_skip = 1,
475474
.prep = io_install_fixed_fd_prep,
476475
.issue = io_install_fixed_fd,
477476
},

io_uring/openclose.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@ int io_install_fixed_fd_prep(struct io_kiocb *req, const struct io_uring_sqe *sq
277277
if (flags & ~IORING_FIXED_FD_NO_CLOEXEC)
278278
return -EINVAL;
279279

280+
/* ensure the task's creds are used when installing/receiving fds */
281+
if (req->flags & REQ_F_CREDS)
282+
return -EPERM;
283+
280284
/* default to O_CLOEXEC, disable if IORING_FIXED_FD_NO_CLOEXEC is set */
281285
ifi = io_kiocb_to_cmd(req, struct io_fixed_install);
282286
ifi->o_flags = O_CLOEXEC;

0 commit comments

Comments
 (0)