CVE-2026-99846: iomap: don't mark unwritten parts of a folio uptodate

Published Nov 30, 2026
·
Updated

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

iomap: don't mark unwritten parts of a folio uptodate

For a buffered write into a hole, an unwritten or new extent, or past EOF iomapwritebegin() zeroes the parts of the blocks outside of the write and then marks the blocks uptodate. That includes the range of the write itself which still holds whatever was in the folio before. It only becomes valid once the copy from userspace has filled it in.

But the copy can come up short and iomapwriteend() only rejects a short copy if the folio isn't uptodate. If the zeroed blocks were all that was missing the folio is uptodate by then, the short copy is accepted, and the rest of the range is exposed to readers and can end up on disk. A source buffer that ends in an unmapped page is enough:

ftruncate(fd, 4096); pwrite(fd, p, 3000, 100); / 16 bytes at p, then PROTNONE / pread(fd, buf, 4096, 0);

The write returns 16 and the read returns 2984 bytes of whatever was in that page before. If other blocks of the folio aren't uptodate the short copy is rejected but the zeroed blocks keep their uptodate bits and the retry with the copied length leaves the same bytes behind.

Only mark blocks uptodate in iomapwritebegin() after reading them. iomapwriteend() marks the zeroed blocks uptodate once the copy has succeeded and rejects a short copy.

Willy reported this back in 2024 (cf. [1]) and Zhang Yi posted the same fix (cf. [2]) but it never got merged.

[1]: https://lore.kernel.org/all/ZqsN5ouQTEc1KAzV@casper.infradead.org [2]: https://lore.kernel.org/all/20240812121159.3775074-6-yi.zhang@huaweicloud.com

Affected Software

12 affected componentsFixes available
Linux Linux kernel
linux/kernel>=4.19.0<5.10.275
5.10.275
linux/kernel>=5.11.0<5.15.226
5.15.226
linux/kernel>=5.16.0<6.1.193
6.1.193
linux/kernel>=6.2.0<6.6.163
6.6.163
linux/kernel>=6.7.0<6.12.118
6.12.118
linux/kernel>=6.13.0<6.18.64
6.18.64
linux/kernel>=6.19.0<7.3.4
7.3.4
debian/linux*
debian/linux<6.12.118-1
6.12.118-1
debian/linux<7.3.4-1
7.3.4-1
debian/linux<=6.1.176-1, <=6.1.192-3, <=6.12.117-1
6.12.118-17.3.4-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.10.275
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.15.226
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.1.193
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.6.163
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.118
  6. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.64
  7. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.4
  8. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.118-1
  9. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 7.3.4-1
  10. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.118-1Fixed in 7.3.4-1

Event History

Nov 30, 2026
CVE Published
via MITRE·01:17 PM
Data Sourced
via MITRE·01:17 PM
Description
Data Sourced
via OSV·01:17 PM
DescriptionAffected Software
Data Sourced
via NVD·02:20 PM
Description

Frequently Asked Questions

1

What conditions are required to trigger the issue?

It involves a buffered write into a hole, an unwritten or new extent, or a range past EOF, followed by a short copy from the userspace source buffer. A source buffer that reaches an unmapped or PROT_NONE page can cause such a short copy.

2

What is the practical impact of a successful trigger?

Bytes that were previously present in the folio can be exposed to readers instead of being rejected or zeroed. Those stale bytes can also be written to disk.

3

Does retrying a write after a short copy avoid the exposure?

Not necessarily. If other blocks in the folio are not uptodate, the initial short copy is rejected, but the zeroed blocks retain their uptodate state; retrying with the copied length can still leave the same stale bytes behind.

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