diff options
| author | Caleb Sander Mateos <csander@purestorage.com> | 2025-12-04 15:43:31 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-12-18 14:03:36 +0100 |
| commit | 0e777da54152fabd626828356f37505344c0ebb2 (patch) | |
| tree | 70355c602ec695b833113116baa2db945df563ba /tools/perf/scripts/python/stackcollapse.py | |
| parent | 6a960b58df612dec4ca8a85c53019b2bfb70f061 (diff) | |
io_uring/kbuf: use READ_ONCE() for userspace-mapped memory
[ Upstream commit 78385c7299f7514697d196b3233a91bd5e485591 ]
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.
Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Fixes: c7fb19428d67 ("io_uring: add support for ring mapped supplied buffers")
Cc: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
