CVE-2026-64064
netfs: Fix netfs_invalidate_folio() to clear dirty bit if all changes gone
Check your servers for CVE-2026-64064
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-64064 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:
netfs: Fix netfs_invalidate_folio() to clear dirty bit if all changes gone
If a streaming write is made, this will leave the relevant modified folio in a not-uptodate, but dirty state with a netfs_folio struct hung off of folio->private indicating the dirty range. Subsequently truncating the file such that the dirty data in the folio is removed, but the first part of the folio theoretically remains will cause the netfs_folio struct to be discarded... but will leave the dirty flag set.
If the folio is then read via mmap(), netfs_read_folio() will see that the page is dirty and jump to netfs_read_gaps() to fill in the missing bits. netfs_read_gaps(), however, expects there to be a netfs_folio struct present and can oops because truncate removed it.
Fix this by calling folio_cancel_dirty() in netfs_invalidate_folio() in the event that all the dirty data in the folio is erased (as nfs does).
Also add some tracepoints to log modifications to a dirty page.
This can be reproduced with something like:
dd if=/dev/zero of=/xfstest.test/foo bs=1M count=1 umount /xfstest.test mount /xfstest.test xfs_io -c "w 0xbbbf 0xf96c" \ -c "truncate 0xbbbf" \ -c "mmap -r 0xb000 0x11000" \ -c "mr 0xb000 0x11000" \ /xfstest.test/foo
with fscaching disabled (otherwise streaming writes are suppressed) and a change to netfs_perform_write() to disallow streaming writes if the fd is open O_RDWR:
if (//(file->f_mode & FMODE_READ) || <--- comment this out netfs_is_cache_enabled(ctx)) {
It should be reproducible even without this change, but if prevents the above trivial xfs_io command from reproducing it.
Note that the initial dd is important: the file must start out sufficiently large that the zero-point logic doesn't just clear the gaps because it knows there's nothing in the file to read yet. Unmounting and mounting is needed to clear the pagecache (there are other ways to do that that may also work).
This was initially reproduced with the generic/522 xfstest on some patches that remove the FMODE_READ restriction.
Exploitation
EPSS 0.16%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 2.90% of all scored CVEs. Scores of 30 Nov 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, before 31ba145faceb378fa01afcb8349e15ea7d95e542 affected from 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, before fb6ec883b48b8789e5e690dcd440d2db941e840c affected from 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, before 65ae8717abf36202fef02260b64b781d2d44a9bf affected from 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, before 156ac2ec2ee77c44c4eb7439d6d165247ba12247
Other versions: unaffected
|
| Linux |
affected 6.8 unaffected before 6.8 unaffected from 6.12.92 up to and including 6.12.* unaffected from 6.18.34 up to and including 6.18.* unaffected from 7.0.11 up to and including 7.0.* unaffected 7.1 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-64064 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-64064
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-64064
trivy image --scanners vuln IMAGE | grep CVE-2026-64064
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/31ba145faceb378fa01afcb8349e15ea7d95e542 git.kernel.org
- https://git.kernel.org/stable/c/fb6ec883b48b8789e5e690dcd440d2db941e840c git.kernel.org
- https://git.kernel.org/stable/c/65ae8717abf36202fef02260b64b781d2d44a9bf git.kernel.org
- https://git.kernel.org/stable/c/156ac2ec2ee77c44c4eb7439d6d165247ba12247 git.kernel.org
Source: the record CVE-2026-64064 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