CVE-2024-50278: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: dm cache: fix potential out-of-bounds access on the first resume Out-of-bounds access occurs if the fast device is expanded unexpectedly before the first-time resume of the cache table. This happens because expanding the fast device requires reloading the cache table for cache_create to allocate new in-core data structures that fit the new size, and the check in cache_preresume is not performed during the first resume, leading to the issue. Reproduce steps: 1. prepare component devices: dmsetup create cmeta --table "0 8192 linear /dev/sdc 0" dmsetup create cdata --table "0 65536 linear /dev/sdc 8192" dmsetup create corig --table "0 524288 linear /dev/sdc 262144" dd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct 2. load a cache table of 512 cache blocks, and deliberately expand the fast device before resuming the cache, making the in-core data structures inadequate. dmsetup create cache --notable dmsetup reload cache --table "0 524288 cache /dev/mapper/cmeta \ /dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0" dmsetup reload cdata --table "0 131072 linear /dev/sdc 8192" dmsetup resume cdata dmsetup resume cache 3. suspend the cache to write out the in-core dirty bitset and hint array, leading to out-of-bounds access to the dirty bitset at offset 0x40: dmsetup suspend cache KASAN reports: BUG: KASAN: vmalloc-out-of-bounds in is_dirty_callback+0x2b/0x80 Read of size 8 at addr ffffc90000085040 by task dmsetup/90 (...snip...) The buggy address belongs to the virtual mapping at [ffffc90000085000, ffffc90000087000) created by: cache_ctr+0x176a/0x35f0 (...snip...) Memory state around the buggy address: ffffc90000084f00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90000084f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 >ffffc90000085000: 00 00 00 00 00 00 00 00 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc90000085080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90000085100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 Fix by checking the size change on the first resume.
AI Analysis
Technical Summary
CVE-2024-50278 is a vulnerability identified in the Linux kernel's device-mapper (dm) cache subsystem. The flaw arises from a potential out-of-bounds memory access during the first resume operation of the cache table when the fast device backing the cache is unexpectedly expanded. Specifically, the cache subsystem maintains in-core data structures that represent the cache table size and layout. When the fast device is expanded before the first resume, the cache table must be reloaded to allocate new data structures that fit the increased size. However, the existing check in the cache_preresume function, which verifies size consistency, is not performed during this initial resume. This omission leads to a mismatch between the in-core data structures and the actual device size, causing out-of-bounds access when the cache subsystem attempts to access or update the dirty bitset and hint arrays. The vulnerability can be reproduced by creating specific device-mapper linear devices, loading a cache table, expanding the fast device size before resuming the cache, and then suspending the cache. This sequence triggers the out-of-bounds access, which has been detected by Kernel Address Sanitizer (KASAN) as a vmalloc-out-of-bounds read. The root cause is a missing size validation on the first resume, which has been addressed by adding a check to ensure the in-core data structures are properly sized before resuming the cache. This vulnerability is significant because it can lead to memory corruption within the kernel space, potentially causing system instability, crashes (kernel panic), or enabling an attacker to execute arbitrary code with kernel privileges if exploited. The vulnerability affects Linux kernel versions identified by the provided commit hash (f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498) and likely other versions containing the same dm cache implementation prior to the fix. No known exploits are reported in the wild as of the publication date (November 19, 2024).
Potential Impact
For European organizations, this vulnerability poses a critical risk primarily to systems running Linux kernels with the affected device-mapper cache implementation. The device-mapper is widely used in enterprise Linux distributions for managing logical volumes, caching, and storage optimization. Organizations relying on Linux servers for critical infrastructure, cloud services, data centers, or embedded systems could experience kernel crashes or potential privilege escalation if attackers exploit this flaw. The out-of-bounds access could be leveraged to corrupt kernel memory, leading to denial of service or potentially arbitrary code execution with root privileges. This is particularly concerning for sectors with high reliance on Linux-based infrastructure such as finance, telecommunications, government, and critical manufacturing. The vulnerability requires local access to the system to trigger the specific device-mapper commands, which somewhat limits remote exploitation but does not eliminate risk from insider threats or compromised accounts. Additionally, automated attack tools or malware could exploit this vulnerability to escalate privileges or destabilize systems. The lack of known exploits currently provides a window for mitigation, but the severity of the flaw demands prompt patching to prevent future exploitation. The impact on confidentiality, integrity, and availability is high due to the kernel-level nature of the vulnerability.
Mitigation Recommendations
European organizations should implement the following specific mitigation steps: 1) Identify and inventory Linux systems using device-mapper cache functionality, especially those running kernel versions prior to the fix commit. 2) Apply the official Linux kernel patches that address CVE-2024-50278 as soon as they become available from trusted sources or Linux distribution vendors. 3) If immediate patching is not feasible, restrict access to device-mapper management tools (e.g., dmsetup) to trusted administrators only, minimizing the risk of unauthorized local exploitation. 4) Monitor system logs and kernel messages for suspicious device-mapper activity or kernel warnings related to cache resume/suspend operations. 5) Employ kernel hardening techniques such as Kernel Address Sanitizer (KASAN) in test environments to detect similar memory issues proactively. 6) Conduct regular security audits and vulnerability scans focusing on kernel and storage subsystem components. 7) Educate system administrators about the risks of device-mapper misuse and ensure strict access controls on systems with critical workloads. These measures go beyond generic advice by focusing on the specific subsystem and operational context of the vulnerability.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Sweden, Finland
CVE-2024-50278: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: dm cache: fix potential out-of-bounds access on the first resume Out-of-bounds access occurs if the fast device is expanded unexpectedly before the first-time resume of the cache table. This happens because expanding the fast device requires reloading the cache table for cache_create to allocate new in-core data structures that fit the new size, and the check in cache_preresume is not performed during the first resume, leading to the issue. Reproduce steps: 1. prepare component devices: dmsetup create cmeta --table "0 8192 linear /dev/sdc 0" dmsetup create cdata --table "0 65536 linear /dev/sdc 8192" dmsetup create corig --table "0 524288 linear /dev/sdc 262144" dd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct 2. load a cache table of 512 cache blocks, and deliberately expand the fast device before resuming the cache, making the in-core data structures inadequate. dmsetup create cache --notable dmsetup reload cache --table "0 524288 cache /dev/mapper/cmeta \ /dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0" dmsetup reload cdata --table "0 131072 linear /dev/sdc 8192" dmsetup resume cdata dmsetup resume cache 3. suspend the cache to write out the in-core dirty bitset and hint array, leading to out-of-bounds access to the dirty bitset at offset 0x40: dmsetup suspend cache KASAN reports: BUG: KASAN: vmalloc-out-of-bounds in is_dirty_callback+0x2b/0x80 Read of size 8 at addr ffffc90000085040 by task dmsetup/90 (...snip...) The buggy address belongs to the virtual mapping at [ffffc90000085000, ffffc90000087000) created by: cache_ctr+0x176a/0x35f0 (...snip...) Memory state around the buggy address: ffffc90000084f00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90000084f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 >ffffc90000085000: 00 00 00 00 00 00 00 00 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc90000085080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90000085100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 Fix by checking the size change on the first resume.
AI-Powered Analysis
Technical Analysis
CVE-2024-50278 is a vulnerability identified in the Linux kernel's device-mapper (dm) cache subsystem. The flaw arises from a potential out-of-bounds memory access during the first resume operation of the cache table when the fast device backing the cache is unexpectedly expanded. Specifically, the cache subsystem maintains in-core data structures that represent the cache table size and layout. When the fast device is expanded before the first resume, the cache table must be reloaded to allocate new data structures that fit the increased size. However, the existing check in the cache_preresume function, which verifies size consistency, is not performed during this initial resume. This omission leads to a mismatch between the in-core data structures and the actual device size, causing out-of-bounds access when the cache subsystem attempts to access or update the dirty bitset and hint arrays. The vulnerability can be reproduced by creating specific device-mapper linear devices, loading a cache table, expanding the fast device size before resuming the cache, and then suspending the cache. This sequence triggers the out-of-bounds access, which has been detected by Kernel Address Sanitizer (KASAN) as a vmalloc-out-of-bounds read. The root cause is a missing size validation on the first resume, which has been addressed by adding a check to ensure the in-core data structures are properly sized before resuming the cache. This vulnerability is significant because it can lead to memory corruption within the kernel space, potentially causing system instability, crashes (kernel panic), or enabling an attacker to execute arbitrary code with kernel privileges if exploited. The vulnerability affects Linux kernel versions identified by the provided commit hash (f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498) and likely other versions containing the same dm cache implementation prior to the fix. No known exploits are reported in the wild as of the publication date (November 19, 2024).
Potential Impact
For European organizations, this vulnerability poses a critical risk primarily to systems running Linux kernels with the affected device-mapper cache implementation. The device-mapper is widely used in enterprise Linux distributions for managing logical volumes, caching, and storage optimization. Organizations relying on Linux servers for critical infrastructure, cloud services, data centers, or embedded systems could experience kernel crashes or potential privilege escalation if attackers exploit this flaw. The out-of-bounds access could be leveraged to corrupt kernel memory, leading to denial of service or potentially arbitrary code execution with root privileges. This is particularly concerning for sectors with high reliance on Linux-based infrastructure such as finance, telecommunications, government, and critical manufacturing. The vulnerability requires local access to the system to trigger the specific device-mapper commands, which somewhat limits remote exploitation but does not eliminate risk from insider threats or compromised accounts. Additionally, automated attack tools or malware could exploit this vulnerability to escalate privileges or destabilize systems. The lack of known exploits currently provides a window for mitigation, but the severity of the flaw demands prompt patching to prevent future exploitation. The impact on confidentiality, integrity, and availability is high due to the kernel-level nature of the vulnerability.
Mitigation Recommendations
European organizations should implement the following specific mitigation steps: 1) Identify and inventory Linux systems using device-mapper cache functionality, especially those running kernel versions prior to the fix commit. 2) Apply the official Linux kernel patches that address CVE-2024-50278 as soon as they become available from trusted sources or Linux distribution vendors. 3) If immediate patching is not feasible, restrict access to device-mapper management tools (e.g., dmsetup) to trusted administrators only, minimizing the risk of unauthorized local exploitation. 4) Monitor system logs and kernel messages for suspicious device-mapper activity or kernel warnings related to cache resume/suspend operations. 5) Employ kernel hardening techniques such as Kernel Address Sanitizer (KASAN) in test environments to detect similar memory issues proactively. 6) Conduct regular security audits and vulnerability scans focusing on kernel and storage subsystem components. 7) Educate system administrators about the risks of device-mapper misuse and ensure strict access controls on systems with critical workloads. These measures go beyond generic advice by focusing on the specific subsystem and operational context of the vulnerability.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-10-21T19:36:19.983Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9824c4522896dcbdf71c
Added to database: 5/21/2025, 9:08:52 AM
Last enriched: 6/28/2025, 1:42:43 PM
Last updated: 8/11/2025, 9:05:43 AM
Views: 13
Related Threats
CVE-2025-8452: CWE-538 Insertion of Sensitive Information into Externally-Accessible File or Directory in Brother Industries, Ltd HL-L8260CDN
MediumCVE-2025-5468: CWE-61: UNIX Symbolic Link in Ivanti Connect Secure
MediumCVE-2025-5466: CWE-776 Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') in Ivanti Connect Secure
MediumCVE-2025-5456: CWE-125 Out-of-bounds Read in Ivanti Connect Secure
HighCVE-2025-3831: CWE-200: Exposure of Sensitive Information to an Unauthorized Actor. in checkpoint Check Point Harmony SASE
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.