Skip to content
Medium 4.4

fuse: don't drop destination page cache on a zero byte copy reply

CVE-2026-138976 First seen on SecPulse

Affected packages

PackageAffected → Fixed
LinuxLinux —
LinuxKernel
≥ 5.4.49, < 5.5→ 5.5
≥ 5.7.6, < 5.8→ 5.8
≥ 5.8.0, < 5.10.275→ 5.10.275
≥ 5.11.0, < 5.15.226→ 5.15.226
≥ 5.16.0, < 6.1.193→ 6.1.193
≥ 6.2.0, < 6.6.163→ 6.6.163
≥ 6.7.0, < 6.12.118→ 6.12.118
≥ 6.13.0, < 6.18.63→ 6.18.63
≥ 6.19.0, < 7.3.4→ 7.3.4

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

In the Linux kernel, the following vulnerability has been resolved:

fuse: don't drop destination page cache on a zero byte copy reply

__fuse_copy_file_range() clears the destination page cache after the
server replies:

truncate_inode_pages_range(inode_out->i_mapping,
			   ALIGN_DOWN(pos_out, PAGE_SIZE),
			   ALIGN(pos_out + bytes_copied, PAGE_SIZE) - 1);

A server may legitimately reply that it copied nothing, eg if the source
file turns out to be shorter than the size the kernel has cached for it.

If pos_out is 0 as well, the end of the range is ALIGN(0, PAGE_SIZE) - 1,
which is -1. lend is a uoff_t and truncate_inode_pages_range() takes -1
as its end of file sentinel, so rather than clearing nothing it drops
every folio in the destination mapping.

That is not only a cache drop. truncate_cleanup_folio() calls
folio_cancel_dirty(), and fuse_writeback_range() only wrote back
[pos_out, pos_out + len - 1], so dirty data elsewhere in the destination
file is discarded without ever reaching the server.

Skip the call when the server copied nothing, since there is nothing
stale to clear in that case.

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details