# CVE-2026-64059: netfs: Fix folio->private handling in netfs_perform_write()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 3% of CVEs (2026-11-30)
- Published: 2026-07-19T15:39:39.607Z
- Modified: 2026-09-02T21:12:45.183Z
- Assigned by: Linux

## Description

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

netfs: Fix folio->private handling in netfs_perform_write()

Under some circumstances, netfs_perform_write() doesn't correctly
manipulate folio->private between NULL, NETFS_FOLIO_COPY_TO_CACHE, pointing
to a group and pointing to a netfs_folio struct, leading to potential
multiple attachments of private data with associated folio ref leaks and
also leaks of netfs_folio structs or netfs_group refs.

Fix this by consolidating the place at which a folio is marked uptodate in
one place and having that look at what's attached to folio->private and
decide how to clean it up and then set the new group.  Also, the content
shouldn't be flushed if group is NULL, even if a group is specified in the
netfs_group parameter, as that would be the case for a new folio.  A
filesystem should always specify netfs_group or never specify netfs_group.

The Sashiko auto-review tool noted that it was theoretically possible that
the fpos >= ctx->zero_point section might leak if it modified a streaming
write folio.  This is unlikely, but with a network filesystem, third party
changes can happen.  It also pointed out that __netfs_set_group() would
leak if called multiple times on the same folio from the "whole folio
modify section".

(As written by CVE List.)

## Affected

- Linux Linux: from 8f52de0077ba3bf41e5d53d67a185700f41efce7 before 7f040243c74d72b45b22246c7d9e621fbeab44ac; from 8f52de0077ba3bf41e5d53d67a185700f41efce7 before 551b5c71ee312ca7646ddb605231c1016e8cbb18; from 8f52de0077ba3bf41e5d53d67a185700f41efce7 before 0969ea8370bad0e4fb6131b6a7bed9e7ec522ac7; from 8f52de0077ba3bf41e5d53d67a185700f41efce7 before ccde2ac757c713535b224233a296de40efe5212d; 6.12 (not affected: before 6.12; from 6.12.92 up to 6.12.*; from 6.18.34 up to 6.18.*; from 7.0.11 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.12 before 6.12.92; from 6.13 before 6.18.34; from 6.19 before 7.0.11; 7.1

## References

- <https://git.kernel.org/stable/c/7f040243c74d72b45b22246c7d9e621fbeab44ac> (patch)
- <https://git.kernel.org/stable/c/551b5c71ee312ca7646ddb605231c1016e8cbb18> (patch)
- <https://git.kernel.org/stable/c/0969ea8370bad0e4fb6131b6a7bed9e7ec522ac7> (patch)
- <https://git.kernel.org/stable/c/ccde2ac757c713535b224233a296de40efe5212d> (patch)

## Sources

- CVE List: [CVE-2026-64059](https://www.cve.org/CVERecord?id=CVE-2026-64059), CVE Terms of Use, modified 2026-07-19
- NVD: [CVE-2026-64059](https://nvd.nist.gov/vuln/detail/CVE-2026-64059), Public domain, modified 2026-09-02

---

Page: https://cve.day/CVE-2026-64059 · Whole record: https://cve.day/CVE-2026-64059.json · Rebuilt by cve.day 2026-11-25T22:59:28.970Z
