[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220412163042.2788062-5-dylany@fb.com>
Date: Tue, 12 Apr 2022 09:30:42 -0700
From: Dylan Yudaken <dylany@...com>
To: <io-uring@...r.kernel.org>
CC: <axboe@...nel.dk>, <asml.silence@...il.com>,
<linux-kernel@...r.kernel.org>, <kernel-team@...com>,
Dylan Yudaken <dylany@...com>
Subject: [PATCH 4/4] io_uring: verify pad field is 0 in io_get_ext_arg
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@...com>
---
fs/io_uring.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index a84bfec97d0d..6b1a98697dcf 100644
--- 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);
--
2.30.2
Powered by blists - more mailing lists