{"id":"CVE-2026-142798","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-12-03T04:18:13.367","lastModified":"2026-12-03T04:18:13.367","vulnStatus":"Received","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\niomap: don't resubmit an ioend after ->writeback_submit() failed\n\niomap_add_to_ioend() submits the pending ioend through\n->writeback_submit() before allocating a new one for the current range.\nWhen the submission fails the helper completes the ioend with an error,\nbut iomap_add_to_ioend() returns the error without clearing\nwpc->wb_ctx.  iomap_writepages() then submits whatever wpc->wb_ctx\npoints to, so the already completed ioend is submitted a second time.\n\nFor XFS the second bio_endio() lands in xfs_end_bio(), which\nlist_add_tail()s the already linked ioend into ip->i_ioend_list.  This\ncorrupts the list and leaves a use-after-free/double-free window against\nthe ioend completion worker.  Reproduced with a fault-injected\n->writeback_submit() failure on a reflinked XFS file with several\nCoW writeback ranges in flight: the unfixed kernel hits repeated\n\"list_add double add\" warnings from __list_add_valid_or_report(),\nthe fixed kernel fails writeback cleanly.\n\nClear wpc->wb_ctx when ->writeback_submit() fails.  The old\niomap_submit_ioend() cleared the context unconditionally; that clear was\nlost when submission moved to iomap_ioend_writeback_submit().  The final\n->writeback_submit() call in iomap_writepages() needs no equivalent fix:\nit is the last thing the function does before returning, and every\ncaller allocates its iomap_writepage_ctx on the stack for a single call,\nso wpc->wb_ctx is never read again afterwards."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["fs/iomap/ioend.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"f4fa7981fa26c664cc540cbce9bcb7ffe02a8912","lessThan":"35096f62ca37ef7d929c89c35938372f365aad25","versionType":"git","status":"affected"},{"version":"f4fa7981fa26c664cc540cbce9bcb7ffe02a8912","lessThan":"212557010f57ae2b2b376e09dc2de1880f56dbc9","versionType":"git","status":"affected"},{"version":"f4fa7981fa26c664cc540cbce9bcb7ffe02a8912","lessThan":"3f517370076f1fedaa38cd8c78ceb73616b79336","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["fs/iomap/ioend.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"6.17","status":"affected"},{"version":"0","lessThan":"6.17","versionType":"semver","status":"unaffected"},{"version":"6.18.61","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"7.3.2","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{},"references":[{"url":"https://git.kernel.org/stable/c/212557010f57ae2b2b376e09dc2de1880f56dbc9","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/35096f62ca37ef7d929c89c35938372f365aad25","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/3f517370076f1fedaa38cd8c78ceb73616b79336","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}