summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorBryam Vargas <hexlabsecurity@proton.me>2026-07-31 17:54:55 -0500
committerMikulas Patocka <mpatocka@redhat.com>2026-08-04 10:19:29 +0200
commit4538a287bdf5d0f9a379c678e5262b9f5783f547 (patch)
treecdff7c9ec0a51fdc3021b9aefe62030a32d54a93 /tools/perf/scripts/python
parent2965787723084835b18dfe993cd450ebf5bd4540 (diff)
dm array: reject an array block whose value size is not the caller's
array_block_check() can only compare the header against itself, so a block with value_size 4 and max_entries 1018 is internally consistent and passes. dm-cache keeps two arrays -- mappings at 8 bytes and hints at 4 -- and the roots for both live in the superblock. Point the mappings root at a hint block and __load_mappings() walks it through an info whose value size is 8, so element_at() strides 8 bytes over 4-byte entries and reaches offset 8160 of a 4096-byte block. get_ablock() and __shadow_ablock() are the two places that hold the block and the caller at once. Reject there when the two value sizes disagree. Arrays only ever read their own blocks, so this fires on crafted metadata only. Fixes: 6513c29f44f2 ("dm persistent data: add transactional array") Suggested-by: Ming-Hung Tsai <mtsai@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Bryam Vargas <hexlabsecurity@proton.me> Reviewed-by: Ming-Hung Tsai <mtsai@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions