CVE-2026-138817
iomap: don't lose a fiemap iteration error when emitting the last extent
Check your servers for CVE-2026-138817
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-138817 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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.
Exploitation
EPSS 0.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 7.07% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 7892386d35715d14c469ec98b6deab037e2e2232, before 904e6876bb9924c8ce8eb83786c68e6404bdb042 affected from 7892386d35715d14c469ec98b6deab037e2e2232, before 635bacc0c05d369a0bea6855b354aa08cc0ab690 affected from 7892386d35715d14c469ec98b6deab037e2e2232, before 29d93cc25328ec27d34098c722ef837778612dd7 affected from 7892386d35715d14c469ec98b6deab037e2e2232, before 512d832beec8d2487e058befb90258e2bce89319 affected from 7892386d35715d14c469ec98b6deab037e2e2232, before d6c4a5d2cc6ad695bdc89ce6ac028eac17484b9a affected from 7892386d35715d14c469ec98b6deab037e2e2232, before 5d6f21538389fa2b9fa143afdebb4cbe170ec900 affected from 7892386d35715d14c469ec98b6deab037e2e2232, before 0d0104adc2c8316433b660cdf6d182a09881864f
Other versions: unaffected
|
| Linux |
affected 5.15 unaffected before 5.15 unaffected from 5.15.226 up to and including 5.15.* unaffected from 6.1.193 up to and including 6.1.* unaffected from 6.6.163 up to and including 6.6.* unaffected from 6.12.117 up to and including 6.12.* unaffected from 6.18.63 up to and including 6.18.* unaffected from 7.3.4 up to and including 7.3.* unaffected 7.4-rc1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-138817 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-138817
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-138817
trivy image --scanners vuln IMAGE | grep CVE-2026-138817
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/904e6876bb9924c8ce8eb83786c68e6404bdb042 git.kernel.org
- https://git.kernel.org/stable/c/635bacc0c05d369a0bea6855b354aa08cc0ab690 git.kernel.org
- https://git.kernel.org/stable/c/29d93cc25328ec27d34098c722ef837778612dd7 git.kernel.org
- https://git.kernel.org/stable/c/512d832beec8d2487e058befb90258e2bce89319 git.kernel.org
- https://git.kernel.org/stable/c/d6c4a5d2cc6ad695bdc89ce6ac028eac17484b9a git.kernel.org
- https://git.kernel.org/stable/c/5d6f21538389fa2b9fa143afdebb4cbe170ec900 git.kernel.org
- https://git.kernel.org/stable/c/0d0104adc2c8316433b660cdf6d182a09881864f git.kernel.org
Source: the record CVE-2026-138817 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse