PT-2026-166521
CVE-2026-142798
·
Published
2026-12-03
·
Updated
2026-12-03
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
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.
Found an issue in the description? Have something to add? Feel free to write us 👾