# CVE-2026-142798: iomap: don't resubmit an ioend after -\>writeback\_submit() failed

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **Published:** 2026-12-03T03:11:29.351Z
- **Modified:** 2026-12-03T04:18:13.367Z

## Who should check

- Anyone running Linux \>= f4fa7981fa26c664cc540cbce9bcb7ffe02a8912, \< 35096f62ca37ef7d929c89c35938372f365aad25; \>= f4fa7981fa26c664cc540cbce9bcb7ffe02a8912, \< 212557010f57ae2b2b376e09dc2de1880f56dbc9; \>= f4fa7981fa26c664cc540cbce9bcb7ffe02a8912, \< 3f517370076f1fedaa38cd8c78ceb73616b79336
- Anyone running Linux 6.17

## Description

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

iomap: don't resubmit an ioend after -\>writeback\_submit() failed

iomap\_add\_to\_ioend() submits the pending ioend through
-\>writeback\_submit() before allocating a new one for the current range.
When the submission fails the helper completes the ioend with an error,
but iomap\_add\_to\_ioend() returns the error without clearing
wpc-\>wb\_ctx.  iomap\_writepages() then submits whatever wpc-\>wb\_ctx
points to, so the already completed ioend is submitted a second time.

For XFS the second bio\_endio() lands in xfs\_end\_bio(), which
list\_add\_tail()s the already linked ioend into ip-\>i\_ioend\_list.  This
corrupts the list and leaves a use-after-free/double-free window against
the ioend completion worker.  Reproduced with a fault-injected
-\>writeback\_submit() failure on a reflinked XFS file with several
CoW writeback ranges in flight: the unfixed kernel hits repeated
"list\_add double add" warnings from \_\_list\_add\_valid\_or\_report(),
the fixed kernel fails writeback cleanly.

Clear wpc-\>wb\_ctx when -\>writeback\_submit() fails.  The old
iomap\_submit\_ioend() cleared the context unconditionally; that clear was
lost when submission moved to iomap\_ioend\_writeback\_submit().  The final
-\>writeback\_submit() call in iomap\_writepages() needs no equivalent fix:
it is the last thing the function does before returning, and every
caller allocates its iomap\_writepage\_ctx on the stack for a single call,
so wpc-\>wb\_ctx is never read again afterwards.

## Affected and fixed versions

- Linux: \>= f4fa7981fa26c664cc540cbce9bcb7ffe02a8912, \< 35096f62ca37ef7d929c89c35938372f365aad25; \>= f4fa7981fa26c664cc540cbce9bcb7ffe02a8912, \< 212557010f57ae2b2b376e09dc2de1880f56dbc9; \>= f4fa7981fa26c664cc540cbce9bcb7ffe02a8912, \< 3f517370076f1fedaa38cd8c78ceb73616b79336 (cvelist)
- Linux: 6.17 (cvelist)

## Technologies

Linux kernel

## Mitigation

- Upgrade Linux to 3f517370076f1fedaa38cd8c78ceb73616b79336 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-142798. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-142798.md
Affected: Linux >= f4fa7981fa26c664cc540cbce9bcb7ffe02a8912, < 35096f62ca37ef7d929c89c35938372f365aad25; >= f4fa7981fa26c664cc540cbce9bcb7ffe02a8912, < 212557010f57ae2b2b376e09dc2de1880f56dbc9; >= f4fa7981fa26c664cc540cbce9bcb7ffe02a8912, < 3f517370076f1fedaa38cd8c78ceb73616b79336; Linux 6.17
Fixed in: Linux 35096f62ca37ef7d929c89c35938372f365aad25, Linux 212557010f57ae2b2b376e09dc2de1880f56dbc9, Linux 3f517370076f1fedaa38cd8c78ceb73616b79336

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-142798 being exploited?

There is no confirmed exploitation: CVE-2026-142798 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-142798?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-142798?

Linux \>= f4fa7981fa26c664cc540cbce9bcb7ffe02a8912, \< 35096f62ca37ef7d929c89c35938372f365aad25; \>= f4fa7981fa26c664cc540cbce9bcb7ffe02a8912, \< 212557010f57ae2b2b376e09dc2de1880f56dbc9; \>= f4fa7981fa26c664cc540cbce9bcb7ffe02a8912, \< 3f517370076f1fedaa38cd8c78ceb73616b79336; Linux 6.17.

### Is there a fix for CVE-2026-142798?

Yes. Fixed in Linux 35096f62ca37ef7d929c89c35938372f365aad25, Linux 212557010f57ae2b2b376e09dc2de1880f56dbc9, Linux 3f517370076f1fedaa38cd8c78ceb73616b79336. Upgrade Linux to 3f517370076f1fedaa38cd8c78ceb73616b79336 or later.

### How do I check if I'm affected by CVE-2026-142798?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/35096f62ca37ef7d929c89c35938372f365aad25>
- other: <https://git.kernel.org/stable/c/212557010f57ae2b2b376e09dc2de1880f56dbc9>
- other: <https://git.kernel.org/stable/c/3f517370076f1fedaa38cd8c78ceb73616b79336>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-142798>

HTML: <https://flawdb.com/CVE-2026-142798> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-142798>
