CVE-2026-45985

ext4: don't set EXT4_GET_BLOCKS_CONVERT when splitting before submitting I/O

State
Published
Severity
Not scored
Published
May 27, 2026
Updated
Oct 30, 2026
Reserved
May 13, 2026

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

ext4: don't set EXT4_GET_BLOCKS_CONVERT when splitting before submitting I/O

When allocating blocks during within-EOF DIO and writeback with dioread_nolock enabled, EXT4_GET_BLOCKS_PRE_IO was set to split an existing large unwritten extent. However, EXT4_GET_BLOCKS_CONVERT was set when calling ext4_split_convert_extents(), which may potentially result in stale data issues.

Assume we have an unwritten extent, and then DIO writes the second half.

[UUUUUUUUUUUUUUUU] on-disk extent U: unwritten extent [UUUUUUUUUUUUUUUU] extent status tree |<- ->| ----> dio write this range

First, ext4_iomap_alloc() call ext4_map_blocks() with EXT4_GET_BLOCKS_PRE_IO, EXT4_GET_BLOCKS_UNWRIT_EXT and EXT4_GET_BLOCKS_CREATE flags set. ext4_map_blocks() find this extent and call ext4_split_convert_extents() with EXT4_GET_BLOCKS_CONVERT and the above flags set.

Then, ext4_split_convert_extents() calls ext4_split_extent() with EXT4_EXT_MAY_ZEROOUT, EXT4_EXT_MARK_UNWRIT2 and EXT4_EXT_DATA_VALID2 flags set, and it calls ext4_split_extent_at() to split the second half with EXT4_EXT_DATA_VALID2, EXT4_EXT_MARK_UNWRIT1, EXT4_EXT_MAY_ZEROOUT and EXT4_EXT_MARK_UNWRIT2 flags set. However, ext4_split_extent_at() failed to insert extent since a temporary lack -ENOSPC. It zeroes out the first half but convert the entire on-disk extent to written since the EXT4_EXT_DATA_VALID2 flag set, but left the second half as unwritten in the extent status tree.

[0000000000SSSSSS] data S: stale data, 0: zeroed [WWWWWWWWWWWWWWWW] on-disk extent W: written extent [WWWWWWWWWWUUUUUU] extent status tree

Finally, if the DIO failed to write data to the disk, the stale data in the second half will be exposed once the cached extent entry is gone.

Fix this issue by not passing EXT4_GET_BLOCKS_CONVERT when splitting an unwritten extent before submitting I/O, and make ext4_split_convert_extents() to zero out the entire extent range to zero for this case, and also mark the extent in the extent status tree for consistency.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • b8a8684502a0fc852afa0056c6bb2a9273f6fcc0 to before 77e407967cd872cd75d7e4a691908e49c8e6b4d4Affected
  • b8a8684502a0fc852afa0056c6bb2a9273f6fcc0 to before 37555690f39f78ef69af347d9aff897e07445949Affected
  • b8a8684502a0fc852afa0056c6bb2a9273f6fcc0 to before 6d8fa684b42724d74a77f980f5ee47cfd1ec7e74Affected
  • b8a8684502a0fc852afa0056c6bb2a9273f6fcc0 to before 67cdb7bd7442bd3cdc6d6088bbb2df9be2fe936cAffected
  • b8a8684502a0fc852afa0056c6bb2a9273f6fcc0 to before 2920ec61c98b9476781359f05b94da84e80f54d4Affected
  • b8a8684502a0fc852afa0056c6bb2a9273f6fcc0 to before 2698731d25823267c29190cb578da9296a0c0d7bAffected
  • b8a8684502a0fc852afa0056c6bb2a9273f6fcc0 to before 716e7439a5a9b18c3ff882c2f8c834b9ced1aaecAffected
  • b8a8684502a0fc852afa0056c6bb2a9273f6fcc0 to before feaf2a80e78f89ee8a3464126077ba8683b62791Affected
LinuxLinux
  • 3.15Affected
  • before 3.15Not affected
  • 5.10.253 through 5.10.*Not affected
  • 5.15.203 through 5.15.*Not affected
  • 6.1.191 through 6.1.*Not affected
  • 6.6.130 through 6.6.*Not affected
  • 6.12.77 through 6.12.*Not affected
  • 6.18.17 through 6.18.*Not affected
  • 6.19.4 through 6.19.*Not affected
  • 7.0 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.