]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring/sync: validate passed in offset
authorJens Axboe <axboe@kernel.dk>
Wed, 21 Jan 2026 18:48:56 +0000 (11:48 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 21 Jan 2026 18:50:59 +0000 (11:50 -0700)
commit649dd18f559891bdafc5532d737c7dfb56060a6d
treef4c220bc899476d46fb94e76aeaaf045c193e855
parent07f3c3a1cd56c2048a92dad0c11f15e4ac3888c1
io_uring/sync: validate passed in offset

Check if the passed in offset is negative once cast to sync->off. This
ensures that -EINVAL is returned for that case, like it would be for
sync_file_range(2).

Fixes: c992fe2925d7 ("io_uring: add fsync support")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/sync.c