From c8b018cd5363aec9f413f134c94cabef243a7b13 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 4 Oct 2023 16:54:26 +0200 Subject: [PATCH] 5.15-stable patches added patches: io_uring-fs-remove-sqe-rw_flags-checking-from-linkat.patch --- ...ve-sqe-rw_flags-checking-from-linkat.patch | 34 +++++++++++++++++++ queue-5.15/series | 1 + 2 files changed, 35 insertions(+) create mode 100644 queue-5.15/io_uring-fs-remove-sqe-rw_flags-checking-from-linkat.patch diff --git a/queue-5.15/io_uring-fs-remove-sqe-rw_flags-checking-from-linkat.patch b/queue-5.15/io_uring-fs-remove-sqe-rw_flags-checking-from-linkat.patch new file mode 100644 index 00000000000..03e1c3b21a0 --- /dev/null +++ b/queue-5.15/io_uring-fs-remove-sqe-rw_flags-checking-from-linkat.patch @@ -0,0 +1,34 @@ +From 6f3d95f8d691f1436c8ba3c14060cdce267bec38 Mon Sep 17 00:00:00 2001 +From: Jens Axboe +Date: Wed, 4 Oct 2023 08:43:13 -0600 +Subject: io_uring/fs: remove sqe->rw_flags checking from LINKAT + +From: Jens Axboe + +commit a52d4f657568d6458e873f74a9602e022afe666f upstream. + +This is unionized with the actual link flags, so they can of course be +set and they will be evaluated further down. If not we fail any LINKAT +that has to set option flags. + +Fixes: cf30da90bc3a ("io_uring: add support for IORING_OP_LINKAT") +Cc: stable@vger.kernel.org +Reported-by: Thomas Leonard +Link: https://github.com/axboe/liburing/issues/955 +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman +--- + io_uring/io_uring.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/io_uring/io_uring.c ++++ b/io_uring/io_uring.c +@@ -4038,7 +4038,7 @@ static int io_linkat_prep(struct io_kioc + + if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) + return -EINVAL; +- if (sqe->ioprio || sqe->rw_flags || sqe->buf_index || sqe->splice_fd_in) ++ if (sqe->ioprio || sqe->buf_index || sqe->splice_fd_in) + return -EINVAL; + if (unlikely(req->flags & REQ_F_FIXED_FILE)) + return -EBADF; diff --git a/queue-5.15/series b/queue-5.15/series index 0ae7ce9c526..1aa015baaf6 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -166,3 +166,4 @@ ata-libata-scsi-ignore-reserved-bits-for-report-supported-operation-codes.patch i2c-i801-unregister-tco_pdev-in-i801_probe-error-path.patch kernel-sched-modify-initial-boot-task-idle-setup.patch sched-rt-fix-live-lock-between-select_fallback_rq-and-rt-push.patch +io_uring-fs-remove-sqe-rw_flags-checking-from-linkat.patch -- 2.47.3