From: Jens Axboe <axboe@kernel.dk>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: Joanne Koong <joannelkoong@gmail.com>,
io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] io_uring/kbuf: use READ_ONCE() for userspace-mapped memory
Date: Thu, 04 Dec 2025 15:47:11 -0700 [thread overview]
Message-ID: <176488843155.1025927.15790018424964919710.b4-ty@kernel.dk> (raw)
In-Reply-To: <20251204224332.1181383-1-csander@purestorage.com>
On Thu, 04 Dec 2025 15:43:31 -0700, Caleb Sander Mateos wrote:
> The struct io_uring_buf elements in a buffer ring are in a memory region
> accessible from userspace. A malicious/buggy userspace program could
> therefore write to them at any time, so they should be accessed with
> READ_ONCE() in the kernel. Commit 98b6fa62c84f ("io_uring/kbuf: always
> use READ_ONCE() to read ring provided buffer lengths") already switched
> the reads of the len field to READ_ONCE(). Do the same for bid and addr.
>
> [...]
Applied, thanks!
[1/1] io_uring/kbuf: use READ_ONCE() for userspace-mapped memory
commit: 78385c7299f7514697d196b3233a91bd5e485591
Best regards,
--
Jens Axboe
prev parent reply other threads:[~2025-12-04 22:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-04 22:43 [PATCH] io_uring/kbuf: use READ_ONCE() for userspace-mapped memory Caleb Sander Mateos
2025-12-04 22:47 ` Jens Axboe [this message]
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=176488843155.1025927.15790018424964919710.b4-ty@kernel.dk \
--to=axboe@kernel.dk \
--cc=csander@purestorage.com \
--cc=io-uring@vger.kernel.org \
--cc=joannelkoong@gmail.com \
--cc=linux-kernel@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