mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-20 09:31:09 +00:00
io_uring: verify pad field is 0 in io_get_ext_arg
[ Upstream commitd2347b9695
] Ensure that only 0 is passed for pad here. Fixes:c73ebb685f
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7a7c9f9de9
commit
9947548d9c
1 changed files with 2 additions and 0 deletions
|
@ -9981,6 +9981,8 @@ static int io_get_ext_arg(unsigned flags, const void __user *argp, size_t *argsz
|
|||
return -EINVAL;
|
||||
if (copy_from_user(&arg, argp, sizeof(arg)))
|
||||
return -EFAULT;
|
||||
if (arg.pad)
|
||||
return -EINVAL;
|
||||
*sig = u64_to_user_ptr(arg.sigmask);
|
||||
*argsz = arg.sigmask_sz;
|
||||
*ts = u64_to_user_ptr(arg.ts);
|
||||
|
|
Loading…
Reference in a new issue