]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.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)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 8 Apr 2021 20:42:41 +0000 (15:42 -0500)
commit8c69b7fb5d787a0767c5883480fdc851bed26b62
treec3f4e7fd11ecc6a78dd3599591d3d7f1085bcf3c
parentb28364e47de91b9b4e21aa03109f1fb57fa9f256
io_uring: fix provide_buffers sign extension

BugLink: https://bugs.launchpad.net/bugs/1922601
[ 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>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/io_uring.c