CVE-2026-142798: iomap: don't resubmit an ioend after ->writeback_submit() failed

Published Dec 3, 2026
·
Updated

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

iomap: don't resubmit an ioend after ->writebacksubmit() failed

iomapaddtoioend() submits the pending ioend through ->writebacksubmit() before allocating a new one for the current range. When the submission fails the helper completes the ioend with an error, but iomapaddtoioend() returns the error without clearing wpc->wbctx. iomapwritepages() then submits whatever wpc->wbctx points to, so the already completed ioend is submitted a second time.

For XFS the second bioendio() lands in xfsendbio(), which listaddtail()s the already linked ioend into ip->iioendlist. This corrupts the list and leaves a use-after-free/double-free window against the ioend completion worker. Reproduced with a fault-injected ->writebacksubmit() failure on a reflinked XFS file with several CoW writeback ranges in flight: the unfixed kernel hits repeated "listadd double add" warnings from listaddvalidorreport(), the fixed kernel fails writeback cleanly.

Clear wpc->wbctx when ->writebacksubmit() fails. The old iomapsubmitioend() cleared the context unconditionally; that clear was lost when submission moved to iomapioendwritebacksubmit(). The final ->writebacksubmit() call in iomapwritepages() needs no equivalent fix: it is the last thing the function does before returning, and every caller allocates its iomapwritepagectx on the stack for a single call, so wpc->wbctx is never read again afterwards.

Affected Software

5 affected componentsFixes available
Linux Linux kernel
linux/kernel>=6.17.0<6.18.61
6.18.61
linux/kernel>=6.19.0<7.3.2
7.3.2
debian/linux<7.3.3-1
7.3.3-1
debian/linux
7.3.3-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 6.18.61
  2. Upgrade

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

    Fixed in 7.3.2
  3. Upgrade

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

    Fixed in 7.3.3-1
  4. Compensating control

    Clear wpc->wb_ctx when ->writeback_submit() fails so the completed ioend is not submitted a second time.

Event History

Dec 3, 2026
CVE Published
via MITRE·03:11 AM
Data Sourced
via MITRE·03:11 AM
Description
Data Sourced
via OSV·03:11 AM
DescriptionAffected Software
Data Sourced
via NVD·04:18 AM
Description

Frequently Asked Questions

1

Which systems are most clearly exposed to this issue?

The documented reproducer involves XFS writeback on a reflinked file with multiple copy-on-write writeback ranges in flight. The failure path corrupts XFS ioend list handling after an ioend is submitted twice.

2

What condition is needed to trigger the vulnerable path?

A ->writeback_submit() operation must fail while iomap is handling a pending ioend and preparing a new one. The issue was reproduced by fault-injecting that submission failure.

3

How might an affected system reveal the problem?

The unfixed kernel produced repeated "list_add double add" warnings from __list_add_valid_or_report(). The resulting list corruption creates a use-after-free and double-free window in the ioend completion worker.

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