This is a note to let you know that I've just added the patch titled io_uring: limit registration w/ SINGLE_ISSUER to the 6.0-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: io_uring-limit-registration-w-single_issuer.patch and it can be found in the queue-6.0 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d7cce96c449e35bbfd41e830b341b95973891eed Mon Sep 17 00:00:00 2001 From: Pavel Begunkov <asml.silence@xxxxxxxxx> Date: Tue, 27 Sep 2022 01:13:30 +0100 Subject: io_uring: limit registration w/ SINGLE_ISSUER From: Pavel Begunkov <asml.silence@xxxxxxxxx> commit d7cce96c449e35bbfd41e830b341b95973891eed upstream. IORING_SETUP_SINGLE_ISSUER restricts what tasks can submit requests. Extend it to registration as well, so non-owning task can't do registrations. It's not necessary at the moment but might be useful in the future. Cc: <stable@xxxxxxxxxxxxxxx> # 6.0 Fixes: 97bbdc06a444 ("io_uring: add IORING_SETUP_SINGLE_ISSUER") Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> Link: https://lore.kernel.org/r/f52a6a9c8a8990d4a831f73c0571e7406aac2bba.1664237592.git.asml.silence@xxxxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- io_uring/io_uring.c | 3 +++ 1 file changed, 3 insertions(+) --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -3710,6 +3710,9 @@ static int __io_uring_register(struct io if (WARN_ON_ONCE(percpu_ref_is_dying(&ctx->refs))) return -ENXIO; + if (ctx->submitter_task && ctx->submitter_task != current) + return -EEXIST; + if (ctx->restricted) { if (opcode >= IORING_REGISTER_LAST) return -EINVAL; Patches currently in stable-queue which might be from asml.silence@xxxxxxxxx are queue-6.0/io_uring-correct-pinned_vm-accounting.patch queue-6.0/io_uring-net-don-t-update-msg_name-if-not-provided.patch queue-6.0/io_uring-rw-fix-unexpected-link-breakage.patch queue-6.0/io_uring-net-don-t-lose-partial-send-recv-on-fail.patch queue-6.0/io_uring-rw-don-t-lose-partial-io-result-on-fail.patch queue-6.0/io_uring-net-fix-fast_iov-assignment-in-io_setup_async_msg.patch queue-6.0/io_uring-net-don-t-lose-partial-send_zc-on-fail.patch queue-6.0/io_uring-limit-registration-w-single_issuer.patch queue-6.0/io_uring-add-custom-opcode-hooks-on-fail.patch queue-6.0/io_uring-rw-don-t-lose-short-results-on-io_setup_async_rw.patch queue-6.0/io_uring-af_unix-defer-registered-files-gc-to-io_uring-release.patch