CVE-2026-72367: iomap: guard io_size EOF trim against concurrent truncate underflow
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iomap: guard io_size EOF trim against concurrent truncate underflow
iomap: fix zero padding data issue in concurrent append writes changed ioend accounting so that io_size tracks only valid data within EOF. This trims io_size when a writeback range extends past end_pos:
ioend->io_size += map_len;
if (ioend->io_offset + ioend->io_size > end_pos)
ioend->io_size = end_pos - ioend->io_offset;However, if end_pos ends up below ioend->io_offset, the subtraction becomes negative and is stored in size_t io_size, causing an unsigned wrap to a huge value. This can happen when writeback continues past byte-level EOF up to a block-aligned range, or when a concurrent truncate shrinks the file after end_pos was sampled in iomap_writeback_handle_eof().
A wrapped io_size can mislead append detection and corrupt completion-time size handling, since filesystem end_io paths consume io_size for decisions such as on-disk EOF updates and unwritten/COW completion ranges.
Fix this by clamping io_size to zero when EOF has moved to or before the ioend start offset. This preserves the original intent of trimming io_size to valid in-EOF data while avoiding the underflow.
The Linux kernel CVE team has assigned CVE-2026-72367 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.13 with commit 51d20d1dacbec589d459e11fc88fbca419f84a99 and fixed in 6.18.40 with commit 1f38f65bf965fce9aa159d45c5347538f56c5973 Issue introduced in 6.13 with commit 51d20d1dacbec589d459e11fc88fbca419f84a99 and fixed in 7.1.5 with commit 7f7780abb4c0fdc9a2603aea8e985ff14ee900e0 Issue introduced in 6.13 with commit 51d20d1dacbec589d459e11fc88fbca419f84a99 and fixed in 7.2-rc2 with commit 55ec50d046c03b3724741957f7b007856e36dbe7 Issue introduced in 6.12.10 with commit 82c59a86a247a8970d353d10f52a37e5564fb137
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-72367
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/iomap/ioend.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/1f38f65bf965fce9aa159d45c5347538f56c5973 https://git.kernel.org/stable/c/7f7780abb4c0fdc9a2603aea8e985ff14ee900e0 https://git.kernel.org/stable/c/55ec50d046c03b3724741957f7b007856e36dbe7