# CVE-2026-64064: netfs: Fix netfs\_invalidate\_folio() to clear dirty bit if all changes gone

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.16% (percentile 3, 2026-11-26)
- **Published:** 2026-07-19T15:39:42.770Z
- **Modified:** 2026-09-03T15:36:23.093Z

## Who should check

- Anyone running Linux \>= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, \< 31ba145faceb378fa01afcb8349e15ea7d95e542; \>= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, \< fb6ec883b48b8789e5e690dcd440d2db941e840c; \>= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, \< 65ae8717abf36202fef02260b64b781d2d44a9bf; \>= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, \< 156ac2ec2ee77c44c4eb7439d6d165247ba12247
- Anyone running Linux 6.8

## 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.

## Affected and fixed versions

- Linux: \>= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, \< 31ba145faceb378fa01afcb8349e15ea7d95e542; \>= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, \< fb6ec883b48b8789e5e690dcd440d2db941e840c; \>= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, \< 65ae8717abf36202fef02260b64b781d2d44a9bf; \>= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, \< 156ac2ec2ee77c44c4eb7439d6d165247ba12247 (cvelist)
- Linux: 6.8 (cvelist)

## Mitigation

- Upgrade Linux to 156ac2ec2ee77c44c4eb7439d6d165247ba12247 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-64064. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-64064.md
Affected: Linux >= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, < 31ba145faceb378fa01afcb8349e15ea7d95e542; >= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, < fb6ec883b48b8789e5e690dcd440d2db941e840c; >= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, < 65ae8717abf36202fef02260b64b781d2d44a9bf; >= 9ebff83e648148b9ece97d4…
Fixed in: Linux 31ba145faceb378fa01afcb8349e15ea7d95e542, Linux 65ae8717abf36202fef02260b64b781d2d44a9bf, Linux 156ac2ec2ee77c44c4eb7439d6d165247ba12247

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-64064 being exploited?

There is no confirmed exploitation: CVE-2026-64064 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.16% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-64064?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-64064?

Linux \>= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, \< 31ba145faceb378fa01afcb8349e15ea7d95e542; \>= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, \< fb6ec883b48b8789e5e690dcd440d2db941e840c; \>= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, \< 65ae8717abf36202fef02260b64b781d2d44a9bf; \>= 9ebff83e648148b9ece97d4e4890dd84ca54d6ce, \< 156ac2ec2ee77c44c4eb7439d6d165247ba12247; Linux 6.8.

### Is there a fix for CVE-2026-64064?

Yes. Fixed in Linux 31ba145faceb378fa01afcb8349e15ea7d95e542, Linux 65ae8717abf36202fef02260b64b781d2d44a9bf, Linux 156ac2ec2ee77c44c4eb7439d6d165247ba12247. Upgrade Linux to 156ac2ec2ee77c44c4eb7439d6d165247ba12247 or later.

### How do I check if I'm affected by CVE-2026-64064?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/31ba145faceb378fa01afcb8349e15ea7d95e542>
- patch: <https://git.kernel.org/stable/c/fb6ec883b48b8789e5e690dcd440d2db941e840c>
- patch: <https://git.kernel.org/stable/c/65ae8717abf36202fef02260b64b781d2d44a9bf>
- patch: <https://git.kernel.org/stable/c/156ac2ec2ee77c44c4eb7439d6d165247ba12247>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-64064>

HTML: <https://flawdb.com/CVE-2026-64064> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-64064>
