diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2026-03-02 13:10:34 +0000 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-03-09 07:21:54 -0600 |
| commit | 484ae637a3e3d909718de7c07afd3bb34b6b8504 (patch) | |
| tree | f3359ff12df7f8a346c8ef3175ef45e389574f81 /io_uring | |
| parent | d9d2455e77d0f36a22b9dbaba8b6354dd1378101 (diff) | |
| download | ath-484ae637a3e3d909718de7c07afd3bb34b6b8504.tar.gz | |
io_uring/timeout: check unused sqe fields
Zero check unused SQE fields addr3 and pad2 for timeout and timeout
update requests. They're not needed now, but could be used sometime
in the future.
Cc: stable@vger.kernel.org
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
| -rw-r--r-- | io_uring/timeout.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/io_uring/timeout.c b/io_uring/timeout.c index cb61d4862fc65..e3815e3465dde 100644 --- a/io_uring/timeout.c +++ b/io_uring/timeout.c @@ -449,6 +449,8 @@ int io_timeout_remove_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) if (unlikely(req->flags & (REQ_F_FIXED_FILE | REQ_F_BUFFER_SELECT))) return -EINVAL; + if (sqe->addr3 || sqe->__pad2[0]) + return -EINVAL; if (sqe->buf_index || sqe->len || sqe->splice_fd_in) return -EINVAL; @@ -521,6 +523,8 @@ static int __io_timeout_prep(struct io_kiocb *req, unsigned flags; u32 off = READ_ONCE(sqe->off); + if (sqe->addr3 || sqe->__pad2[0]) + return -EINVAL; if (sqe->buf_index || sqe->len != 1 || sqe->splice_fd_in) return -EINVAL; if (off && is_timeout_link) |
