]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: fix provide_buffers sign extension
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 19 Mar 2021 10:21:19 +0000 (10:21 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:30:29 +0000 (14:30 +0200)
commit9c36abf596d5546fe09663efe89eade3486f23d7
tree98f1b9d18f8b10cea58c649acc5dca5c772577bc
parent3c840c4de8a9e733231316b8de9a6f8a8a5eeb25
io_uring: fix provide_buffers sign extension

[ Upstream commit d81269fecb8ce16eb07efafc9ff5520b2a31c486 ]

io_provide_buffers_prep()'s "p->len * p->nbufs" to sign extension
problems. Not a huge problem as it's only used for access_ok() and
increases the checked length, but better to keep typing right.

Reported-by: Colin Ian King <colin.king@canonical.com>
Fixes: efe68c1ca8f49 ("io_uring: validate the full range of provided buffers for access")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/562376a39509e260d8532186a06226e56eb1f594.1616149233.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io_uring.c