Skip to content

Commit d2347b9

Browse files
Dylan Yudakenaxboe
authored andcommitted
io_uring: verify pad field is 0 in io_get_ext_arg
Ensure that only 0 is passed for pad here. Fixes: c73ebb6 ("io_uring: add timeout support for io_uring_enter()") Signed-off-by: Dylan Yudaken <dylany@fb.com> Link: https://lore.kernel.org/r/20220412163042.2788062-5-dylany@fb.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 6fb53cf commit d2347b9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/io_uring.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10711,6 +10711,8 @@ static int io_get_ext_arg(unsigned flags, const void __user *argp, size_t *argsz
1071110711
return -EINVAL;
1071210712
if (copy_from_user(&arg, argp, sizeof(arg)))
1071310713
return -EFAULT;
10714+
if (arg.pad)
10715+
return -EINVAL;
1071410716
*sig = u64_to_user_ptr(arg.sigmask);
1071510717
*argsz = arg.sigmask_sz;
1071610718
*ts = u64_to_user_ptr(arg.ts);

0 commit comments

Comments
 (0)