diff options
author | Jens Axboe <[email protected]> | 2023-10-02 18:14:08 -0600 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2023-10-03 08:12:28 -0600 |
commit | f8024f1f36a30a082b0457d5779c8847cea57f57 (patch) | |
tree | 28a39457d23b95f0e264808ddd1915373193934a /drivers/scsi/mpi3mr/mpi/mpi30_ioc.h | |
parent | a52d4f657568d6458e873f74a9602e022afe666f (diff) |
io_uring/kbuf: don't allow registered buffer rings on highmem pages
syzbot reports that registering a mapped buffer ring on arm32 can
trigger an OOPS. Registered buffer rings have two modes, one of them
is the application passing in the memory that the buffer ring should
reside in. Once those pages are mapped, we use page_address() to get
a virtual address. This will obviously fail on highmem pages, which
aren't mapped.
Add a check if we have any highmem pages after mapping, and fail the
attempt to register a provided buffer ring if we do. This will return
the same error as kernels that don't support provided buffer rings to
begin with.
Link: https://lore.kernel.org/io-uring/[email protected]/
Fixes: c56e022c0a27 ("io_uring: add support for user mapped provided buffer ring")
Cc: [email protected]
Reported-by: [email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'drivers/scsi/mpi3mr/mpi/mpi30_ioc.h')
0 files changed, 0 insertions, 0 deletions