HIGH Introduced in 3.9
dm-array ArrayBlock OOB
CVE-2026-89574
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.0MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: dm array: validate array block headers on read array_block_check() validates blocknr and csum and nothing else, while node_check(), next to it, has bounded the structural fields since both were written. dm_array_cursor_next() takes its loop bound from the on-disk nr_entries and element_at() is unguarded pointer arithmetic, so a count larger than the block holds keeps the cursor in one block while the index grows past it and the read walks off the dm-bufio buffer -- dm_cache_load_mappings() drives it once per cache block at activation. Check the header against itself: reject a zero value_size, require max_entries to equal calc_max_entries() for that value_size and block size, and require nr_entries to fit. Equality rather than an upper bound, since a count below the real capacity trips BUG_ON() in fill_ablock() and trim_ablock(). Metadata dm-array writes satisfies all three.
02KernelScan AI Analysis
Risk summary
A crafted dm-cache metadata block device can cause the kernel to read far past the end of a buffer when loading cache mappings, leaking kernel memory or crashing the system. Exploitation requires root-level privileges to activate a device-mapper cache target with the malicious metadata. Systems that do not use dm-cache or that restrict device-mapper configuration are not affected.
Vulnerability analysis
The dm-array metadata validator only checked the block number and checksum of array blocks, but did not validate the structural header fields that control how many entries are iterated. A crafted metadata block can set the entry count larger than the block actually holds, so when the cursor walks the array it performs unguarded pointer arithmetic past the end of the dm-bufio buffer, reading arbitrary kernel memory or hitting an unmapped page and crashing. The fix adds cross-field validation at read time: the value size must be non-zero, the declared maximum entries must exactly match the computed capacity for that block size, and the actual entry count must not exceed the maximum. This bug is reachable only through the device-mapper cache activation path, which requires CAP_SYS_ADMIN to configure the target with a crafted metadata block device.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| mainline | 3.9 | 7.3-rc1 | 296578772308 |
| 6.12 | 3.9 | 6.12.109 | 67adda7ed5da |
| 7.2 | 3.9 | 7.2.4 | 9808ddffb4bc |
| 6.18 | 3.9 | 6.18.50 | b33f76d33aae |
| cip/6.12 | 3.9 | 6.12.111-cip32 | 67adda7ed5da |