Skip to main content
Vulnerability Database/CVE-2026-98867

CVE-2026-98867: Linux Kernel Privilege Escalation Vulnerability

CVE-2026-98867 is a privilege escalation vulnerability in the Linux kernel dm-pcache module that allows unauthorized elevation of privileges. This post explains its technical details, affected versions, impact, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98867 Overview

CVE-2026-98867 is a Linux kernel vulnerability in the dm-pcache device-mapper target. The flaw resides in cache_key_decode(), which reads a logical offset from the cache device backed by persistent memory. That offset is later used to index req_key_tree->subtrees[] inside get_subtree() without validation. An offset past the device produces a subtree pointer outside the array, and rb_insert() writes through that pointer during replay. The upstream fix rejects keys of zero length and keys whose off+len (computed in 64 bits) exceeds the device size before use.

Critical Impact

An attacker-controlled or corrupted persistent-memory cache can trigger an out-of-bounds write in kernel memory during cache replay, enabling kernel memory corruption.

Affected Products

  • Linux kernel versions containing the dm-pcache device-mapper target prior to the fixing commits
  • Distributions shipping affected stable kernel branches referenced in the kernel.org commits
  • Systems using persistent-memory-backed dm-pcache cache devices

Discovery Timeline

  • 2026-10-18 - CVE-2026-98867 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98867

Vulnerability Analysis

The dm-pcache target implements a persistent-memory-backed cache using a red-black tree of key subtrees. During cache replay, cache_key_decode() reads a key structure from the cache device, including a logical offset field. The function get_subtree() then uses this offset to index into the req_key_tree->subtrees[] array.

Without bounds checks, a logical offset larger than the device size resolves to a subtree pointer outside the allocated array. When rb_insert() operates on that bogus subtree root, it performs writes to arbitrary kernel memory. Zero-length keys produce similar inconsistencies in the tree traversal logic.

The condition triggers on any mount or replay of a cache device whose on-media key metadata is malformed or malicious. This classifies as an out-of-bounds write driven by missing input validation on persisted data.

Root Cause

The root cause is absent validation of untrusted data read from persistent storage. cache_key_decode() trusted the off and len fields of each key without verifying that off+len fits within the device size or that len is non-zero. The subsequent array indexing in get_subtree() therefore produced an unchecked pointer.

Attack Vector

Exploitation requires the kernel to replay a crafted or corrupted dm-pcache cache device. A local actor able to attach a malicious persistent-memory image, or an environment where cache metadata is corrupted, can drive the out-of-bounds write. Remote exploitation is not described in the advisory.

The upstream patch rejects a key of zero length, or whose off+len exceeds the device size, before the key is used. See the fix in the kernel.org commits:

Detection Methods for CVE-2026-98867

Indicators of Compromise

  • Kernel oops, panic, or BUG entries in dmesg referencing dm-pcache, cache_key_decode, get_subtree, or rb_insert during device activation or replay.
  • Unexpected memory corruption, slab corruption warnings, or KASAN out-of-bounds reports tied to dm-pcache code paths.
  • Presence of untrusted or unverified persistent-memory images attached as dm-pcache cache devices.

Detection Strategies

  • Inventory hosts loading the dm-pcache module (lsmod | grep pcache) and correlate with kernel versions lacking the fix commits.
  • Monitor kernel ring buffer and journald for crashes in device-mapper replay paths following cache attach or resume operations.
  • Enable KASAN on test kernels to surface out-of-bounds writes originating from the dm-pcache replay routine.

Monitoring Recommendations

  • Alert on kernel panics or oopses on systems using persistent-memory caching, especially around device activation.
  • Audit creation of new dm-pcache targets and the provenance of their backing persistent-memory devices.
  • Track distribution security feeds for stable kernel releases that incorporate the fixing commits.

How to Mitigate CVE-2026-98867

Immediate Actions Required

  • Apply the upstream kernel patches referenced in the kernel.org commits as soon as vendor builds are available.
  • Restrict attachment of dm-pcache cache devices to trusted administrators and trusted persistent-memory images only.
  • Unload the dm-pcache module on systems that do not require persistent-memory caching until patched kernels are deployed.

Patch Information

The fix adds bounds checking in cache_key_decode() to reject a key of zero length or whose off+len (computed in 64 bits) exceeds the device size before it is used. The patches are available in the following commits: Linux Kernel Commit 10449703, Linux Kernel Commit 3d5a87cb, and Linux Kernel Commit 97fc4b53. Rebuild from a stable branch that includes these commits or install the vendor update that references them.

Workarounds

  • Disable or blacklist the dm-pcache kernel module where persistent-memory caching is not required.
  • Avoid activating dm-pcache targets from untrusted or externally supplied persistent-memory images.
  • Restrict CAP_SYS_ADMIN and device-mapper access to a minimal set of administrators to reduce the attack surface for replay-based corruption.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.