CVE-2026-53265: Linux Kernel dm-cache SMQ Race Condition
A race condition exists in the Linux kernel's Device Mapper cache policy subsystem (SMQ). When two processes attempt to invalidate cache blocks simultaneously, they can both check whether a cache entry is in use before either one acquires the necessary lock. The first process removes the entry and frees it; the second process then acts on stale information, potentially corrupting internal data structures or causing a double-free error. This vulnerability requires local access and affects systems running vulnerable kernel versions.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- —
- Affected products
- 10 configuration(s)
- Published / Modified
- 2026-06-25 / 2026-07-08
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: dm cache policy smq: check allocation under invalidate lock commit 2d1f7b65f5de ("dm cache policy smq: fix missing locks in invalidating cache blocks") added mq->lock around the destructive part of smq_invalidate_mapping(), but left the e->allocated check outside the critical section. That leaves a check-then-act race. Two concurrent invalidators can both observe e->allocated as true before either of them takes mq->lock. The first invalidator that acquires the lock removes the entry from the queues and hash table and then calls free_entry(), which clears e->allocated and puts the entry back on the free list. The second invalidator can then acquire mq->lock and continue with the stale result of the unlocked check. This can corrupt the SMQ queues or hash table by deleting an entry that is no longer on those structures. It can also hit the allocation check in free_entry() when the same entry is freed again. Move the allocation check under mq->lock so the predicate and the destructive operations are serialized by the same lock.
8 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-53265 is a check-then-act race condition in dm_cache_policy_smq.c's smq_invalidate_mapping() function. The e->allocated predicate check occurs outside the mq->lock critical section, allowing concurrent invalidators to observe the same allocated entry before either acquires the lock. After the first invalidator removes the entry from queues and hash tables and calls free_entry() (which clears e->allocated), the second invalidator proceeds with outdated state, leading to deletion of entries no longer in their structures or double-free conditions that trigger allocation checks in free_entry(). The fix moves the allocation check into the mq->lock critical section, serializing the predicate with destructive operations.
Business impact
Exploitation can result in kernel memory corruption, denial of service through crash or hang, or privilege escalation via heap manipulation. Systems with DMCache enabled and handling concurrent cache invalidation workloads (common in high-I/O environments like databases, caching layers, and storage appliances) face elevated risk. Impact severity depends on system role and cache pressure patterns.
Affected systems
Linux kernel versions containing the incomplete fix from commit 2d1f7b65f5de are affected. Specifically, kernel versions from that commit through the one containing the full fix are vulnerable. Systems with dm-cache configured and active must patch. Verify your exact kernel version against the Linux kernel security advisory and your distribution's patch status.
Exploitability
Exploitation requires local system access and unprivileged user capability. No special privileges are needed to trigger concurrent cache block invalidations. The vulnerability is not network-exploitable; it requires an attacker with shell access or a local service with cache access permissions. Successful exploitation is probabilistic—the race window is narrow but reproducible under contention.
Remediation
Apply the kernel patch that relocates the e->allocated check into the mq->lock critical section. Affected distributions and custom kernel maintainers must backport or update to a patched version. Immediate patching is recommended for production systems using dm-cache, particularly those under high I/O concurrency.
Patch guidance
Consult your Linux distribution's security advisory for the specific patched kernel version (e.g., RHEL, Ubuntu, Debian, SUSE, etc.). For custom or upstream kernels, apply the fix upstream or backport the patch from the Linux kernel repository. Verify the patch includes moving the e->allocated check inside the mq->lock region. Test in a staging environment before production deployment, particularly on systems with high cache invalidation activity.
Detection guidance
Monitor kernel logs for use-after-free or double-free warnings from dm-cache subsystem. Look for BUG_ON messages in free_entry(). Kernel Address Sanitizer (KASAN) and CONFIG_DEBUG_PAGEALLOC will flag corruption. Correlation of cache invalidation storms with system instability or crashes may indicate exploitation attempts. Check /proc/modules for dm_cache module presence; if absent, the system is not vulnerable via this vector.
Why prioritize this
HIGH severity with local privilege escalation and data corruption potential. Affects production infrastructure, particularly high-throughput storage and caching systems. The race condition is reproducible under cache pressure and impacts system stability and data integrity. Local access requirement limits external attack surface but does not eliminate internal threat vectors.
Risk score, explained
CVSS 3.1 score 7.8 (HIGH) reflects local attack vector (AV:L), low complexity (AC:L), low privilege requirement (PR:L), no user interaction (UI:N), unchanged scope (S:U), and high confidentiality, integrity, and availability impact (C:H/I:H/A:H). The combination of memory corruption, denial of service, and potential privilege escalation justifies the high rating despite requiring local access.
Frequently asked questions
Does this vulnerability require elevated privileges?
No. The vulnerability can be triggered by an unprivileged local user or process with access to cache invalidation mechanisms. PR:L in the CVSS vector means a user must have some local presence, but not root or elevated privileges.
How can I check if my system is vulnerable?
Verify your kernel version against your distribution's security advisory. Systems with dm-cache enabled in the kernel config and running versions containing but not patched for commit 2d1f7b65f5de are at risk. Use 'uname -r' to check your kernel version and cross-reference with your vendor's patch bulletins.
Is this exploitable over the network?
No. The vulnerability requires local system access. It cannot be triggered remotely and does not affect network-facing services directly unless they depend on a vulnerable kernel's caching behavior.
What happens if exploitation succeeds?
Successful exploitation corrupts kernel memory structures, typically causing kernel panics, system hangs, or, in some scenarios, privilege escalation if an attacker can manipulate the corrupted heap. Data loss is possible if the cache corruption affects cached data integrity.
This analysis is based on published vulnerability data as of the modification date 2026-07-08. CVSS score, patch versions, and affected product details are sourced from official Linux kernel security advisories; verify against your distribution's security bulletins for precise patch guidance. This document does not constitute legal or compliance advice. Organizations should validate applicability to their specific kernel versions and configurations before implementing patches. No exploit code or proof-of-concept instructions are provided. Contact your system vendor for definitive patch and support timelines. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).
Affected vendors
Related vulnerabilities
- CVE-2026-0270HIGHCortex XSOAR Path Traversal on Linux — Exploit Requirements & Patching Guide
- CVE-2026-0271HIGHPalo Alto Networks Prisma Access Agent Linux Privilege Escalation
- CVE-2026-10001HIGHChrome Sandbox Escape via PerformanceManager Use-After-Free
- CVE-2026-10002HIGHGoogle Chrome PDFium Use-After-Free Vulnerability (CVSS 8.8)
- CVE-2026-10003HIGHChrome Use-After-Free Code Execution Vulnerability Analysis
- CVE-2026-10006HIGHChrome WebAudio Race Condition Remote Code Execution
- CVE-2026-10007HIGHChrome Use-After-Free in SVG Arbitrary Code Execution (CVSS 8.8)
- CVE-2026-10009HIGHChrome Skia Integer Overflow Sandbox Escape – Patch Guidance