CVE-2026-45985: ext4: don't set EXT4_GET_BLOCKS_CONVERT when splitting before submitting I/O

Published May 27, 2026
·
Updated

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

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

When allocating blocks during within-EOF DIO and writeback with dioreadnolock enabled, EXT4GETBLOCKSPREIO was set to split an existing large unwritten extent. However, EXT4GETBLOCKSCONVERT was set when calling ext4splitconvertextents(), 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, ext4iomapalloc() call ext4mapblocks() with EXT4GETBLOCKSPREIO, EXT4GETBLOCKSUNWRITEXT and EXT4GETBLOCKSCREATE flags set. ext4mapblocks() find this extent and call ext4splitconvertextents() with EXT4GETBLOCKSCONVERT and the above flags set.

Then, ext4splitconvertextents() calls ext4splitextent() with EXT4EXTMAYZEROOUT, EXT4EXTMARKUNWRIT2 and EXT4EXTDATAVALID2 flags set, and it calls ext4splitextentat() to split the second half with EXT4EXTDATAVALID2, EXT4EXTMARKUNWRIT1, EXT4EXTMAYZEROOUT and EXT4EXTMARKUNWRIT2 flags set. However, ext4splitextentat() 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 EXT4EXTDATAVALID2 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 EXT4GETBLOCKSCONVERT when splitting an unwritten extent before submitting I/O, and make ext4splitconvertextents() to zero out the entire extent range to zero for this case, and also mark the extent in the extent status tree for consistency.

Affected Software

7 affected components
Linux Linux kernel (ext4)
Linux Linux kernel>=3.15<5.10.253
Linux Linux kernel>=5.11<5.15.203
Linux Linux kernel>=5.16<6.6.130
Linux Linux kernel>=6.7<6.12.77
Linux Linux kernel>=6.13<6.18.17
Linux Linux kernel>=6.19<6.19.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Disable the dioread_nolock behavior (do not enable dioread_nolock) to avoid the within-EOF DIO + writeback code path that can trigger splitting unwritten extents before submitting I/O.

    ext4 dioread_nolock = disabled
  2. Compensating control

    Avoid performing within-EOF direct I/O (DIO) writes that may split unwritten extents until the kernel fix is applied. Prefer synchronous/coordinated writes or application-level file locking to prevent DIO from writing only part of an unwritten extent.

  3. Operational

    When available from your vendor or upstream, apply the kernel patch that implements the fix: do not pass EXT4_GET_BLOCKS_CONVERT when splitting an unwritten extent before submitting I/O, and make ext4_split_convert_extents() zero out the entire extent range and mark the extent in the extent status tree for consistency.

Event History

May 27, 2026
CVE Published
via MITRE·12:18 PM
Data Sourced
via MITRE·12:18 PM
Description
Data Sourced
via NVD·02:17 PM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-45985?

The severity of CVE-2026-45985 is rated as medium with a CVSS score of 5.5.

2

What type of vulnerability is CVE-2026-45985?

CVE-2026-45985 is a vulnerability related to the ext4 filesystem in the Linux kernel.

3

How do I fix CVE-2026-45985?

To fix CVE-2026-45985, ensure that the Linux kernel is updated to a version that includes the patch for this vulnerability.

4

Is CVE-2026-45985 exploitable?

CVE-2026-45985 can be exploited under specific conditions related to block allocation during DIO operations.

5

What impact does CVE-2026-45985 have on system security?

CVE-2026-45985 could lead to potential data corruption during I/O operations in the ext4 filesystem.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203