CVE-2026-53062: Linux Kernel dm-cache SMQ Race Condition in Passthrough Mode
A concurrency bug in the Linux kernel's device mapper cache policy allows multiple workers to simultaneously invalidate cache blocks without proper synchronization. When a cache is in passthrough mode, this missing lock protection creates a race condition that can corrupt internal counter data or cause use-after-free memory errors. An attacker with local access can trigger this vulnerability by writing to a cache device configured in passthrough mode with concurrent I/O operations, potentially leading to kernel crashes or memory corruption.
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)
- CWE-667
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-07-21
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: dm cache policy smq: fix missing locks in invalidating cache blocks In passthrough mode, the policy invalidate_mapping operation is called simultaneously from multiple workers, thus it should be protected by a lock. Otherwise, we might end up with data races on the allocated blocks counter, or even use-after-free issues with internal data structures when doing concurrent writes. Note that the existing FIXME in smq_invalidate_mapping() doesn't affect passthrough mode since migration tasks don't exist there, but would need attention if supporting fast device shrinking via suspend/resume without target reloading. Reproduce steps: 1. Create a cache device consisting of 1024 cache entries dmsetup create cmeta --table "0 8192 linear /dev/sdc 0" dmsetup create cdata --table "0 131072 linear /dev/sdc 8192" dmsetup create corig --table "0 262144 linear /dev/sdc 262144" dd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct dmsetup create cache --table "0 262144 cache /dev/mapper/cmeta \ /dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0" 2. Populate the cache, and record the number of cached blocks fio --name=populate --filename=/dev/mapper/cache --rw=randwrite --bs=4k \ --size=64m --direct=1 nr_cached=$(dmsetup status cache | awk '{split($7, a, "/"); print a[1]}') 3. Reload the cache into passthrough mode dmsetup suspend cache dmsetup reload cache --table "0 262144 cache /dev/mapper/cmeta \ /dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 passthrough smq 0" dmsetup resume cache 4. Write to the passthrough cache. By setting multiple jobs with I/O size equal to the cache block size, cache blocks are invalidated concurrently from different workers. fio --filename=/dev/mapper/cache --name=test --rw=randwrite --bs=64k \ --direct=1 --numjobs=2 --randrepeat=0 --size=64m 5. Check if demoted matches cached block count. These numbers should match but may differ due to the data race. nr_demoted=$(dmsetup status cache | awk '{print $12}') echo "$nr_cached, $nr_demoted"
8 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-53062 is a synchronization vulnerability in the Linux kernel's dm-cache subsystem, specifically in the SMQ (Sorted Multiqueue) cache policy's invalidate_mapping operation. In passthrough mode, the invalidate_mapping function lacks necessary locking when called concurrently from multiple worker threads, creating data races on the allocated blocks counter and potential use-after-free conditions on internal policy structures. The vulnerability manifests when cache blocks are invalidated concurrently during writes, as demonstrated by the provided reproduction steps involving FIO workloads against a passthrough-mode cache device. The existing FIXME comment in smq_invalidate_mapping() does not address passthrough mode since migration tasks do not operate there, but the function still requires synchronization for safe concurrent block invalidation.
Business impact
Organizations relying on Linux-based storage systems with device mapper caching in passthrough mode face potential data corruption and system instability. A local attacker could crash the kernel or corrupt filesystem metadata by triggering concurrent cache block invalidation. This is particularly concerning for containerized environments, multi-tenant cloud platforms, and storage appliances where local access is accessible to unprivileged users or where cache passthrough mode is used for performance tuning during maintenance windows.
Affected systems
The vulnerability affects Linux kernel versions using the dm-cache subsystem with the SMQ cache policy in passthrough mode. Any system with an active cache device configured with the smq policy and operating in passthrough mode is potentially vulnerable. The issue does not affect writethrough or writeback modes to the same extent, as passthrough mode specifically triggers the concurrent invalidation pattern described. Kernel versions prior to the patch are affected; the patch availability should be verified against the Linux kernel development repository.
Exploitability
The vulnerability requires local access to the system and the ability to perform concurrent I/O operations against a cache device in passthrough mode. The attack is straightforward: configure a cache in passthrough mode and perform multi-threaded write operations with I/O block sizes matching cache block sizes. No authentication bypass or privilege escalation is required beyond initial local access. The race condition is reliably reproducible via the provided steps using standard tools like dmsetup and fio, making practical exploitation readily achievable by users with local access privileges.
Remediation
Apply the Linux kernel patch that adds proper locking to the smq_invalidate_mapping() function to synchronize access in passthrough mode. The fix involves protecting the invalidate_mapping operation with appropriate mutex or spinlock mechanisms to ensure atomic updates to the allocated blocks counter and safe concurrent access to internal cache policy data structures. Affected organizations should track Linux kernel releases and apply patches as they become available through their distribution channels.
Patch guidance
Verify the availability of a patched Linux kernel version from your distribution maintainer. For systems running unpatched kernels with dm-cache in passthrough mode, immediately audit cache configuration—if passthrough mode is not actively required, switch the cache to writethrough or writeback mode. If passthrough mode is necessary, prioritize kernel patching as part of the next scheduled maintenance window. Check your distribution's security advisories and kernel release notes for the specific version containing the fix; do not rely on automatic updates without testing in non-production environments first due to potential storage layer implications.
Detection guidance
Monitor for kernel log messages indicating use-after-free errors, NULL pointer dereferences, or data consistency warnings related to dm-cache operations. Observe dmsetup status output for the cache device: significant mismatches between the demoted block count and the original cached block count may indicate the race condition has occurred. Enable kernel address sanitizer (KASAN) or dynamic debugging in test environments to catch memory corruption early. Additionally, monitor for unexpected kernel panics or soft lockups on systems with active passthrough-mode cache devices under heavy concurrent I/O load.
Why prioritize this
This vulnerability merits high priority due to its CVSS 7.8 rating and potential for kernel instability and data corruption in production storage systems. Although it requires local access, the reproducibility and relative ease of triggering concurrent invalidation make it a practical threat in multi-tenant or containerized environments. The combination of memory corruption (use-after-free) and data race conditions could lead to silent data corruption or kernel crashes, both unacceptable outcomes for storage infrastructure.
Risk score, explained
The CVSS 3.1 score of 7.8 (HIGH) reflects a locally-exploitable vulnerability with low attack complexity, high impact on confidentiality, integrity, and availability, and no user interaction required. The score appropriately captures the severity: while local access is needed, the ease of reproduction and the critical nature of kernel memory corruption justify the elevated rating. The vulnerability is not currently tracked in the CISA Known Exploited Vulnerabilities catalog, but the straightforward reproduction path suggests it could transition to active exploitation if widely disclosed without prior patching.
Frequently asked questions
Does this vulnerability affect caches in writethrough or writeback mode?
No. The vulnerability is specific to passthrough mode because that mode exhibits the concurrent invalidation pattern that triggers the race condition. Writethrough and writeback modes do not call invalidate_mapping concurrently in the same manner, though they may still benefit from the synchronization fix for completeness.
What is the practical impact if the race condition occurs?
The allocated blocks counter may become inaccurate, causing mismatches between the expected and actual number of demoted cache blocks. More critically, use-after-free errors can lead to kernel memory corruption, potential information disclosure, denial of service via kernel panic, or in worst cases, privilege escalation or system compromise.
How can I determine if my system is vulnerable?
Verify that your kernel version is prior to the patched release (check your distribution's advisories), and confirm you are running a cache device with the smq policy in passthrough mode using `dmsetup status cache`. If both conditions are true, your system is vulnerable.
Can this be exploited remotely or without privileges?
No. The vulnerability requires local access to the system and the ability to issue I/O commands to the cache device. Typically this means local user access with read/write permissions to the cache device node, which is usually restricted to root or specific service accounts.
This analysis is based on the CVE description and publicly available information as of the source data publication date. Patch availability and affected kernel versions should be verified against official Linux kernel repositories, distribution security advisories, and vendor documentation. The reproduction steps and exploit conditions are provided for authorized security testing and patching purposes only. Organizations should apply patches through their established change management and testing procedures. This assessment does not constitute professional security advice; consult with your security team or a qualified security professional for deployment-specific guidance. Source: NVD (public-domain), retrieved 2026-08-01. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-46112HIGHLinux HNS RDMA Driver Locking Bug Enables Local Privilege Escalation
- CVE-2026-46299HIGHLinux Kernel HFS+ Lock Handling Vulnerability
- CVE-2026-52946HIGHLinux Kernel SOFTIRQ-Unsafe Lock Order Denial of Service
- CVE-2026-53054HIGHLinux Kernel msm DRM VM_BIND Locking Vulnerability – Local Privilege Escalation
- CVE-2026-53071HIGHLinux Kernel L2CAP Use-After-Free Remote DoS & Privilege Escalation
- CVE-2026-53072HIGHLinux Kernel Bluetooth Use-After-Free Vulnerability (CVSS 8.8)
- CVE-2026-46156MEDIUMLinux Kernel Loongson GPU Driver ADE Panic on Loongarch
- CVE-2026-46165MEDIUMLinux Kernel Open vSwitch Vport Deadlock Denial of Service