projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fb53cf
)
io_uring: verify pad field is 0 in io_get_ext_arg
author
Dylan Yudaken
<dylany@fb.com>
Tue, 12 Apr 2022 16:30:42 +0000
(09:30 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Tue, 12 Apr 2022 16:46:54 +0000
(10:46 -0600)
Ensure that only 0 is passed for pad here.
Fixes: c73ebb685fb6 ("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>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index a84bfec97d0def0a0531d30af022f9fabd3fa169..6b1a98697dcf295e20828abed8b670e5099915b3 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-10711,6
+10711,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);