summaryrefslogtreecommitdiff
path: root/scripts/package/gen-diff-patch
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2026-04-09 16:30:14 +0300
committerJens Axboe <axboe@kernel.dk>2026-04-10 04:08:35 +0300
commit211ff1602b67e26125977f8b2f369d7c2847628c (patch)
treed7376474d7fc27ddd9f5bdc6767f80f919b3db2c /scripts/package/gen-diff-patch
parent23b3b6f0b584b70a427d5bb826d320151890d7da (diff)
downloadlinux-211ff1602b67e26125977f8b2f369d7c2847628c.tar.xz
ublk: verify all pages in multi-page bvec fall within registered range
rq_for_each_bvec() yields multi-page bvecs where bv_page is only the first page. ublk_try_buf_match() only validated the start PFN against the maple tree, but a bvec can span multiple pages past the end of a registered range. Use mas_walk() instead of mtree_load() to obtain the range boundaries stored in the maple tree, and check that the bvec's end PFN does not exceed the range. Also remove base_pfn from struct ublk_buf_range since mas.index already provides the range start PFN. Reported-by: Caleb Sander Mateos <csander@purestorage.com> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Link: https://patch.msgid.link/20260409133020.3780098-3-tom.leiming@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/package/gen-diff-patch')
0 files changed, 0 insertions, 0 deletions