Files
linux/io_uring
Caleb Sander Mateos 78385c7299 io_uring/kbuf: use READ_ONCE() for userspace-mapped memory
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 98b6fa62c8 ("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: c7fb19428d ("io_uring: add support for ring mapped supplied buffers")
Cc: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-12-04 15:46:23 -07:00
..
2025-01-28 15:10:40 -07:00
2025-11-13 07:27:34 -07:00
2025-09-08 08:06:37 -06:00
2025-02-17 16:43:04 -08:00
2025-03-07 13:41:08 -07:00
2024-02-09 09:04:39 -07:00
2025-11-13 11:19:37 -07:00