Skip to main content

CVE-2024-50015: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-50015cvecve-2024-50015
Published: Mon Oct 21 2024 (10/21/2024, 18:54:06 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ext4: dax: fix overflowing extents beyond inode size when partially writing The dax_iomap_rw() does two things in each iteration: map written blocks and copy user data to blocks. If the process is killed by user(See signal handling in dax_iomap_iter()), the copied data will be returned and added on inode size, which means that the length of written extents may exceed the inode size, then fsck will fail. An example is given as: dd if=/dev/urandom of=file bs=4M count=1 dax_iomap_rw iomap_iter // round 1 ext4_iomap_begin ext4_iomap_alloc // allocate 0~2M extents(written flag) dax_iomap_iter // copy 2M data iomap_iter // round 2 iomap_iter_advance iter->pos += iter->processed // iter->pos = 2M ext4_iomap_begin ext4_iomap_alloc // allocate 2~4M extents(written flag) dax_iomap_iter fatal_signal_pending done = iter->pos - iocb->ki_pos // done = 2M ext4_handle_inode_extension ext4_update_inode_size // inode size = 2M fsck reports: Inode 13, i_size is 2097152, should be 4194304. Fix? Fix the problem by truncating extents if the written length is smaller than expected.

AI-Powered Analysis

AILast updated: 06/28/2025, 16:24:32 UTC

Technical Analysis

CVE-2024-50015 is a vulnerability found in the Linux kernel's ext4 filesystem implementation, specifically related to the Direct Access (DAX) feature. The issue arises in the dax_iomap_rw() function, which handles mapping written blocks and copying user data to those blocks during file writes. When a process performing a write operation is interrupted by a user signal (e.g., killed), the function may incorrectly update the inode size by adding the amount of data copied rather than the actual amount successfully written. This causes the length of written extents to exceed the inode size, leading to inconsistencies between the recorded file size and the actual data extents on disk. As a result, filesystem check tools like fsck report errors such as "Inode 13, i_size is 2097152, should be 4194304," indicating inode size mismatches. The root cause is that partial writes interrupted by signals do not properly truncate extents to reflect the true written length. The fix involves truncating extents when the written length is smaller than expected, ensuring inode size and extents remain consistent. This vulnerability affects Linux kernel versions containing the specified commit hashes and impacts systems using ext4 with DAX enabled. No known exploits are reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability primarily threatens data integrity and filesystem reliability on Linux systems using ext4 with DAX enabled. While it does not directly lead to remote code execution or privilege escalation, the inconsistency between inode size and extents can cause filesystem corruption, leading to data loss or system downtime during fsck operations. Critical infrastructure, cloud providers, and enterprises relying on Linux servers with ext4 DAX for high-performance storage may experience service interruptions or require manual filesystem repairs. This can impact availability of services and potentially cause operational disruptions. Since the vulnerability is triggered by interrupted write operations, it may be more likely to manifest in environments with frequent process terminations or unstable workloads. However, the lack of known exploits and the requirement for specific conditions reduce the immediate risk of widespread attacks. Nonetheless, the potential for data corruption necessitates prompt patching to maintain filesystem integrity and avoid costly recovery efforts.

Mitigation Recommendations

European organizations should prioritize updating Linux kernels to versions containing the patch that truncates extents correctly after partial writes interrupted by signals. System administrators should: 1) Identify and inventory Linux systems using ext4 with DAX enabled, focusing on servers handling large or critical file writes. 2) Apply vendor-provided kernel updates or patches as soon as they become available. 3) Implement monitoring for filesystem errors and fsck warnings related to inode size mismatches to detect early signs of this issue. 4) Avoid abrupt process terminations during critical write operations where possible, to reduce triggering the vulnerability. 5) Maintain regular backups and test filesystem recovery procedures to minimize data loss risk. 6) Consider disabling DAX on ext4 filesystems if immediate patching is not feasible and the performance trade-off is acceptable. These steps go beyond generic advice by focusing on the specific conditions and filesystem features involved in this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-10-21T12:17:06.062Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9824c4522896dcbdfce0

Added to database: 5/21/2025, 9:08:52 AM

Last enriched: 6/28/2025, 4:24:32 PM

Last updated: 8/16/2025, 8:48:02 AM

Views: 16

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats