From: Jens Axboe <axboe@kernel.dk>
To: BeaCox <0xbeac@gmail.com>
Cc: io-uring@vger.kernel.org
Subject: Re: [PATCH] io_uring/rsrc: hold uring_lock across index-alloc put_user
Date: Wed, 4 Nov 2026 08:12:39 -0700 [thread overview]
Message-ID: <7cd23f57-dbf3-4175-8a4d-25b099aac4b5@kernel.dk> (raw)
In-Reply-To: <20261104092818.70521-1-0xbeac@gmail.com>
On 11/4/26 2:28 AM, BeaCox wrote:
> io_files_update_with_index_alloc() installs a fixed file via
> io_fixed_fd_install(), which drops ->uring_lock when the request runs on
> io-wq, then put_user()s the allocated slot back to userspace. If that
> faults, the error path calls __io_close_fixed() by slot index after
> re-taking the lock.
>
> The slot can be closed and reused between the install and that cleanup:
> another fixed CLOSE plus open/accept/pipe/socket, or a FILES_UPDATE, can
> put an unrelated file into the same slot. The error path then removes
> that file instead of the one this request installed, ending an unrelated
> file's fixed-table reference early. This is a correctness/DoS issue, not
> a use-after-free: fixed-file requests hold an io_rsrc_node reference, so
> the node and file stay alive until they are done.
>
> Hold ->uring_lock across __io_fixed_fd_install() and put_user(), and do
> the failure cleanup with io_fixed_fd_remove() under the same lock. This
> is the same class as io_pipe_fixed() (CVE-2026-99265); faulting while
> holding ->uring_lock is fine, the registration paths already do it.
Fix looks fine to me, but it's not a CVE kind of bug. Neither is the
one referenced, I'll get that one invalidated.
--
Jens Axboe
next prev parent reply other threads:[~2026-11-04 15:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 9:28 [PATCH] io_uring/rsrc: hold uring_lock across index-alloc put_user BeaCox
2026-11-04 15:12 ` Jens Axboe [this message]
2026-11-04 15:15 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7cd23f57-dbf3-4175-8a4d-25b099aac4b5@kernel.dk \
--to=axboe@kernel.dk \
--cc=0xbeac@gmail.com \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox