summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2026-09-09 09:06:31 +0100
committerJens Axboe <axboe@kernel.dk>2026-09-10 14:44:39 -0600
commitb0d8d56b7c93ed767eb4f2be9988e7b9dc023566 (patch)
tree47790f53349355f51ac83ee2f7628ddd5204250b /scripts/Makefile.thinlto
parentc4fa55f85c47cd5d54d717fb8170746edb10292e (diff)
downloadlinux-stable-b0d8d56b7c93ed767eb4f2be9988e7b9dc023566.tar.gz
linux-stable-b0d8d56b7c93ed767eb4f2be9988e7b9dc023566.zip
block: Fix start and length check added to iov_iter_extract_bvecs()
Commit 14b007e17881 added an address check using iter_iov_addr() and a length check using iter_iov_len() to iov_iter_extract_bvecs(), but these cannot be used so and are unsafe in this circumstance as the functions have hardwired assumptions about the iterator type. They should only be used with ITER_UBUF or ITER_IOVEC-type iterators; they shouldn't be used with ITER_BVEC, ITER_KVEC, ITER_FOLIOQ, ITER_XARRAY or ITER_DISCARD iterators. This proves to be a problem for cachefiles as an iterator of type ITER_FOLIOQ is passed and iter_iov_addr() and iter_iov_len() both malfunction because iter->__iov in iter_iov() is not pointing to an iovec array. Fix this by using iov_iter_alignment() instead. Fixes: 14b007e17881 ("block: validate user space vectors during extraction") Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Keith Busch <kbusch@kernel.org> cc: Hannes Reinecke <hare@kernel.org> cc: Christoph Hellwig <hch@infradead.org> cc: Jens Axboe <axboe@kernel.dk> cc: Alexander Viro <viro@zeniv.linux.org.uk> cc: Paulo Alcantara <pc@manguebit.org> cc: netfs@lists.linux.dev cc: linux-block@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/1667275.1788941191@warthog.procyon.org.uk Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions