summaryrefslogtreecommitdiff
path: root/init/version-timestamp.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-08-20 18:31:58 -0600
committerJens Axboe <axboe@kernel.dk>2024-08-21 07:16:38 -0600
commite0ee967630c8ee67bb47a5b38d235cd5a8789c48 (patch)
treeb0524cacc89428b5fa737fe18c9c8e0e580453fe /init/version-timestamp.c
parent1fc2ac428ef7d2ab9e8e19efe7ec3e58aea51bf3 (diff)
downloadlwn-e0ee967630c8ee67bb47a5b38d235cd5a8789c48.tar.gz
lwn-e0ee967630c8ee67bb47a5b38d235cd5a8789c48.zip
io_uring/kbuf: sanitize peek buffer setup
Harden the buffer peeking a bit, by adding a sanity check for it having a valid size. Outside of that, arg->max_len is a size_t, though it's only ever set to a 32-bit value (as it's governed by MAX_RW_COUNT). Bump our needed check to a size_t so we know it fits. Finally, cap the calculated needed iov value to the PEEK_MAX_IMPORT, which is the maximum number of segments that should be peeked. Fixes: 35c8711c8fc4 ("io_uring/kbuf: add helpers for getting/peeking multiple buffers") Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'init/version-timestamp.c')
0 files changed, 0 insertions, 0 deletions