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-2024-50278 Overview
CVE-2024-50278 is an out-of-bounds read vulnerability [CWE-125] in the Linux kernel's device mapper (dm) cache target. The flaw occurs when the fast (cache) device is expanded unexpectedly before the first-time resume of the cache table. The cache_preresume size check is skipped on the initial resume, leaving in-core data structures sized for the original device. A local user with privileges to manipulate device mapper targets can then trigger an out-of-bounds access to the dirty bitset, confirmed by KASAN reports in is_dirty_callback. The condition impacts kernel confidentiality and availability on affected Linux systems.
Critical Impact
Local privileged users can trigger a kernel out-of-bounds read in dm-cache, leading to information disclosure or a denial of service through kernel memory corruption.
Affected Products
- Linux kernel stable branches prior to the fix commits listed in the kernel.org advisories
- Linux kernel 6.12 release candidates (rc1 through rc6)
- Debian LTS distributions shipping affected kernel builds (see Debian LTS announcements January and March 2025)
Discovery Timeline
- 2024-11-19 - CVE-2024-50278 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-50278
Vulnerability Analysis
The Linux dm-cache target uses a fast storage device to cache blocks from a slower origin device. The in-core data structures, including the dirty bitset and hint array, are sized during cache_create based on the fast device's size at table load time. On subsequent resumes, cache_preresume validates whether the fast device has grown and triggers reallocation. On the first resume, this check is bypassed under the assumption that the table was just loaded with correct geometry.
An administrator with device mapper privileges can defeat this assumption by reloading the fast device to a larger size between the cache table load and the first dmsetup resume. The cache then operates with undersized in-core bitmaps while reporting the larger block count. Subsequent operations, such as suspending the cache to write out the dirty bitset, index past the end of the allocated vmalloc region. KASAN flags this as vmalloc-out-of-bounds in is_dirty_callback at an 8-byte read beyond the mapping.
Root Cause
The root cause is a missing size-change validation path during the first resume of a dm-cache table. The guard in cache_preresume only runs when a prior resume state exists, so a mismatch between the fast device size at cache_create time and the actual device size at first resume goes undetected.
Attack Vector
Exploitation requires local access with privileges to create and manipulate device mapper targets, typically CAP_SYS_ADMIN. The attacker loads a cache table referencing a fast device, then reloads and resumes the fast device at a larger size before resuming the cache. Triggering a cache suspend walks the undersized dirty bitset and reads adjacent kernel memory. The published reproducer uses standard dmsetup create, dmsetup reload, and dmsetup resume commands against linear targets backed by /dev/sdc.
No verified exploit code is published. The vulnerability is described in prose in the upstream commit messages; refer to Kernel Git Commit 483b7261 for the authoritative fix and technical description.
Detection Methods for CVE-2024-50278
Indicators of Compromise
- KASAN kernel log entries reporting vmalloc-out-of-bounds reads in is_dirty_callback or allocations originating from cache_ctr
- Unexpected kernel oops, warnings, or panics referencing the dm-cache module during dmsetup suspend or dmsetup resume operations
- dmsetup reload operations that resize a device backing an active dm-cache fast device before the cache has been resumed
Detection Strategies
- Audit kernel ring buffer (dmesg) and /var/log/kern.log for KASAN reports and dm-cache-related call traces on hosts running affected kernels
- Monitor Linux audit subsystem (auditd) for dmsetup invocations that reload fast cache devices with new sizes prior to the initial cache resume
- Correlate device mapper table changes with process identity and parent process to flag unusual administrative activity
Monitoring Recommendations
- Collect kernel logs centrally and alert on KASAN or dm-cache oops signatures
- Baseline legitimate device mapper administration patterns and alert on deviations, especially cache table reloads outside change windows
- Track the installed kernel package versions across the fleet and flag hosts still running pre-patch builds
How to Mitigate CVE-2024-50278
Immediate Actions Required
- Upgrade affected Linux kernels to a build that includes the fix commits referenced in the kernel.org stable advisories
- Restrict CAP_SYS_ADMIN and device mapper access to trusted administrators only
- Reboot hosts after kernel upgrades to ensure the patched kernel is loaded in place of running vulnerable builds
Patch Information
The upstream fix adds a size-change check on the first resume path in dm-cache. Backports are available across stable branches; see Kernel Git Commit 036dd6e, Kernel Git Commit 13ed3624, Kernel Git Commit 2222b092, Kernel Git Commit 483b7261, Kernel Git Commit c0ade5d9, Kernel Git Commit c52ec00c, Kernel Git Commit e492f718, and Kernel Git Commit fdef3b94. Debian users should review the Debian LTS Announcement January 2025 and Debian LTS Announcement March 2025.
Workarounds
- Avoid resizing fast devices backing a dm-cache target between table load and the first resume; always resume the cache before changing underlying device geometry
- Where kernel upgrades cannot be scheduled immediately, remove or disable dm-cache usage on exposed hosts and rely on alternative caching mechanisms
- Limit shell and sudo access to accounts that require device mapper administration and log all such sessions for review
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

