dm array: reject an array block whose value size is not the caller's
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6513c29f44f2cc970c0e9fecfe5a6526c3e73025 · < ac4a5eb8b002a0742c938fc98b922e243f53573a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
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.
From the CVE record · Linux
The Linux kernel’s dm array code can accept a metadata block whose value size differs from what the caller expects. If a dm-cache mappings root points to a crafted hint block, loading the mappings can access beyond the block’s bounds. The input does not specify attacker access requirements or user interaction.
Engineers running Linux systems that use dm-cache should check their kernel versions; affected versions are not specified.