KernelScan.io

HIGH Introduced in 6.18

dm-pcache KsetKey OOB

CVE-2026-80961

CVSS 7.8 / 10.0 NVD

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

KernelScan AI5.8MEDIUM

01

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.

02

Engine v0.6.0

Risk summary

A local attacker with CAP_SYS_ADMIN who can supply a crafted cache device to a dm-pcache target can trigger out-of-bounds reads that leak persistent memory contents to userspace and may crash the kernel. The vulnerability exists in metadata parsing where two fields — the kset key count and a key's intra-segment offset/length — are used without bounds checking. Systems using dm-pcache with persistent memory caching are affected.

Affecteddrivers/md/dm-pcache/cache_key.c, cache_gc.c, cache_writeback.c (dm-pcache)

Vulnerability analysis

The dm-pcache device-mapper target decodes two metadata fields from the cache device without adequate bounds checking: the kset key count, which can exceed the fixed-size key buffer and drive reads past its end, and a key's intra-segment offset and length, which can run past the segment boundary. When a crafted cache device is replayed, the kernel reads beyond allocated buffers and copies adjacent persistent memory into the caller's I/O buffers, leaking data to userspace; an excessively large key count can also read into unmapped memory and panic the kernel. The fix adds a validation function that bounds the key count before any buffer access and rejects keys whose offset plus length exceeds the segment data size, computed in 64 bits to avoid integer overflow. The attack surface is limited to whoever can supply and configure a cache device, which requires CAP_SYS_ADMIN in the init namespace.

03

BranchIntroducedFixed inPatch commit
7.26.187.2.45ac38f4b4862
6.186.186.18.50d8caf96040a0
mainline6.187.3-rc1f11deb032fd8