Linux Kernel ext4 Inline Data Length Overflow Vulnerability Leading to Kernel Bug

Vulnerability

A vulnerability in the Linux kernel's ext4 file system has been identified, specifically within the inline data handling. When the inline data feature is enabled, a length overflow can occur in the 'ext4_prepare_inline_data' function. This issue arises when a file is written to with a position that exceeds the maximum value for a 64-bit unsigned integer, causing the length parameter to be incorrectly calculated. As a result, a kernel bug is triggered when the 'ext4_write_inline_data' function checks the position and length, leading to a crash. The vulnerability has been addressed by changing the data type of the length parameter to 'loff_t' in the 'ext4_prepare_inline_data' function, ensuring proper handling of large file positions.

Impact

Exploitation of this vulnerability causes a kernel crash due to an invalid opcode error, disrupting system operations and potentially leading to a denial of service.

Reproduction

To reproduce this vulnerability, create a file on an ext4 filesystem with the inline data feature enabled. Open the file with read and write permissions, truncate it to 30 bytes, and then write a single byte to a position that exceeds the 64-bit unsigned integer limit. This will trigger the length overflow and cause the system to crash when the inline data write operation is completed.

Remediation

Users should update to the latest version of the Linux kernel where this vulnerability has been fixed.

Added: Jul 4, 2025, 2:42 PM
Updated: Jul 4, 2025, 2:42 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
4.3
remediation
7.7
relevance
0.2
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.