ZeroHour

CVE-2026-80961

niche

Out-of-bounds read in Linux kernel dm-pcache leaks memory to user space

CVSS 3.1
7.8 high
EPSS
Published
()
Modified
AI analysis

The Linux kernel's dm-pcache device-mapper target fails to validate two fields decoded from a persistent-memory cache device: the kset key_num, which is unbounded against the PCACHE_KSET_KEYS_MAX buffer, and each key's intra-segment offset and length, which are taken verbatim and can run past the segment's data_size. An attacker with CAP_SYS_ADMIN who supplies a crafted cache device can exploit the fact that only a magic value and a fixed public-seed CRC are checked first, causing out-of-bounds reads during kset replay and inserting bogus keys into the cache tree. Subsequent data-CRC checks and read hits then copy adjacent persistent-memory contents into the caller's bio, disclosing kernel/pmem memory to user space, and the same unvalidated fields drive the writeback and garbage-collection workers. Because triggering requires local access and the privilege to attach a cache device, this is mainly a sandbox/container escape or malicious-device scenario rather than a remote attack, and valid metadata is unaffected by the fix. No public proof of concept or in-the-wild exploitation is known.

What to do: Update to a kernel build containing the fix, which adds kset_onmedia_valid() to bound key_num before any kset read and rejects keys whose 64-bit offset-plus-length exceeds the segment data_size. Until patched, restrict CAP_SYS_ADMIN and device-mapper setup privileges so untrusted users or containers cannot attach arbitrary cache devices, and only bring up dm-pcache with cache devices from trusted sources. Hosts not using dm-pcache need no action beyond routine kernel patching.

Affected
Linux kernel (dm-pcache device-mapper target)
Estimated exposure
nicheLikely low thousands of hosts at most; no reliable deployment count exists — dm-pcache is a recently introduced, non-default device-mapper target that requires deliberate setup with persistent-memory cache devices and CAP_SYS_ADMIN, and no public scan or telemetry data tracks its deployment.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

In the Linux kernel, the following vulnerability has been resolved: dm-pcache: validate kset key_num and intra-segment bounds Two more fields decoded from the cache device go unbounded. The kset key_num drives cache_kset_crc() and the replay loop in cache_replay(), the writeback worker and the GC worker, but only the magic and a fixed-seed CRC are checked first, so a non-last kset whose key_num exceeds the PCACHE_KSET_KEYS_MAX buffer reads past its end before the CRC compare. A key's intra-segment offset and length in cache_key_decode() are taken verbatim, so a key running past its segment is replayed into the cache tree and the data CRC check and every later read hit then copy adjacent persistent memory into the caller's bio -- an out-of-bounds read that leaks to user space. Both fields are controlled by whoever supplies the cache device (CAP_SYS_ADMIN); the CRC seed is public. Add kset_onmedia_valid() to bound key_num before any kset read, and reject a key whose offset plus length, computed in 64 bits, exceeds the segment data_size. Valid metadata is unaffected.

Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the news

No ingested article mentions this CVE yet.