Junglewise Threat Intelligence

CVE-2025-38222: Linux Kernel ext4 integer overflow in ext4_prepare_inline_data

CVE-2025-38222 · Severity: medium · CVSS 5.5 · Published 2025-07-04

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's ext4 file system could allow a local user to crash the system. The issue occurs when handling specific file write operations on systems with the 'inline_data' feature enabled. An exploit results in a kernel panic, leading to a complete system outage and denial of service.

Technical details

An integer overflow vulnerability exists in the ext4 filesystem component of the Linux kernel, specifically within the ext4_prepare_inline_data function. The root cause is the use of an 'unsigned int' for the length parameter, which can be truncated when processing large file offsets (e.g., using pwrite with an offset exceeding 32 bits). This truncation causes a subsequent sanity check (BUG_ON) in ext4_write_inline_data to fail during the write_end phase, triggering a kernel panic. The vulnerability requires the 'inline_data' feature to be enabled on the ext4 partition. A local attacker with standard file write permissions can trigger this crash. The fix involves changing the length parameter type to 'loff_t' to correctly handle 64-bit offsets.

Affected products

  • Linux Linux Kernel versions prior to 6.15-rc2

Timeline

  • 2025-04-15: patched: Initial patch submitted by Thadeu Lima de Souza Cascardo
  • 2025-07-04: disclosed: CVE published to NVD

References

Related threats