Bug 2586348 (CVE-2026-138817) - CVE-2026-138817 kernel: kernel: incorrect FIEMAP error handling leads to truncated file extent data
Summary: CVE-2026-138817 kernel: kernel: incorrect FIEMAP error handling leads to trun...
Keywords:
Status: NEW
Alias: CVE-2026-138817
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-11-30 13:43 UTC by OSIDB Bzimport
Modified: 2026-11-30 19:30 UTC (History)
17 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-11-30 13:43:50 UTC
In the Linux kernel, the following vulnerability has been resolved:

iomap: don't lose a fiemap iteration error when emitting the last extent

iomap_fiemap() emits extents one behind: iomap_fiemap_iter() flushes the
previous extent and remembers the current one, and the remembered extent
is written with FIEMAP_EXTENT_LAST after the iteration loop.

That final flush overwrites ret, so when ->iomap_begin() fails partway
through the iteration the error is replaced by the result of
iomap_to_fiemap() (zero on success) and iomap_fiemap() returns success
with a truncated extent list whose last entry is wrongly marked as the
last extent in the file.  The pre-iomap_iter code returned the error
from inside the loop, before flushing the pending extent.

Check for the iteration error before flushing the pending extent, so
that real errors are propagated and only a successful iteration emits
the final FIEMAP_EXTENT_LAST extent.  -ENOENT (no mapping) is still not
an error, and the pending extent is still emitted in that case.


Note You need to log in before you can comment on or make changes to this bug.