{"id":"CVE-2026-64059","state":"PUBLISHED","title":"netfs: Fix folio->private handling in netfs_perform_write()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfs: Fix folio->private handling in netfs_perform_write()\n\nUnder some circumstances, netfs_perform_write() doesn't correctly\nmanipulate folio->private between NULL, NETFS_FOLIO_COPY_TO_CACHE, pointing\nto a group and pointing to a netfs_folio struct, leading to potential\nmultiple attachments of private data with associated folio ref leaks and\nalso leaks of netfs_folio structs or netfs_group refs.\n\nFix this by consolidating the place at which a folio is marked uptodate in\none place and having that look at what's attached to folio->private and\ndecide how to clean it up and then set the new group.  Also, the content\nshouldn't be flushed if group is NULL, even if a group is specified in the\nnetfs_group parameter, as that would be the case for a new folio.  A\nfilesystem should always specify netfs_group or never specify netfs_group.\n\nThe Sashiko auto-review tool noted that it was theoretically possible that\nthe fpos >= ctx->zero_point section might leak if it modified a streaming\nwrite folio.  This is unlikely, but with a network filesystem, third party\nchanges can happen.  It also pointed out that __netfs_set_group() would\nleak if called multiple times on the same folio from the \"whole folio\nmodify section\".","publishedAt":"2026-07-19T15:39:39.607Z","updatedAt":"2026-07-19T15:39:39.607Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"8f52de0077ba3bf41e5d53d67a185700f41efce7","status":"affected","lessThan":"7f040243c74d72b45b22246c7d9e621fbeab44ac","versionType":"git"},{"version":"8f52de0077ba3bf41e5d53d67a185700f41efce7","status":"affected","lessThan":"551b5c71ee312ca7646ddb605231c1016e8cbb18","versionType":"git"},{"version":"8f52de0077ba3bf41e5d53d67a185700f41efce7","status":"affected","lessThan":"0969ea8370bad0e4fb6131b6a7bed9e7ec522ac7","versionType":"git"},{"version":"8f52de0077ba3bf41e5d53d67a185700f41efce7","status":"affected","lessThan":"ccde2ac757c713535b224233a296de40efe5212d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/netfs/buffered_write.c","include/trace/events/netfs.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.92","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.34","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.11","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/netfs/buffered_write.c","include/trace/events/netfs.h"]}],"references":["https://git.kernel.org/stable/c/7f040243c74d72b45b22246c7d9e621fbeab44ac","https://git.kernel.org/stable/c/551b5c71ee312ca7646ddb605231c1016e8cbb18","https://git.kernel.org/stable/c/0969ea8370bad0e4fb6131b6a7bed9e7ec522ac7","https://git.kernel.org/stable/c/ccde2ac757c713535b224233a296de40efe5212d"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:41.951Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/64xxx/CVE-2026-64059.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-64059","state":"PUBLISHED","datePublished":"2026-07-19T15:39:39.607Z","dateUpdated":"2026-07-19T15:39:39.607Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-07-19T07:54:57.030Z"},"containers":{"cna":{"title":"netfs: Fix folio->private handling in netfs_perform_write()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfs: Fix folio->private handling in netfs_perform_write()\n\nUnder some circumstances, netfs_perform_write() doesn't correctly\nmanipulate folio->private between NULL, NETFS_FOLIO_COPY_TO_CACHE, pointing\nto a group and pointing to a netfs_folio struct, leading to potential\nmultiple attachments of private data with associated folio ref leaks and\nalso leaks of netfs_folio structs or netfs_group refs.\n\nFix this by consolidating the place at which a folio is marked uptodate in\none place and having that look at what's attached to folio->private and\ndecide how to clean it up and then set the new group.  Also, the content\nshouldn't be flushed if group is NULL, even if a group is specified in the\nnetfs_group parameter, as that would be the case for a new folio.  A\nfilesystem should always specify netfs_group or never specify netfs_group.\n\nThe Sashiko auto-review tool noted that it was theoretically possible that\nthe fpos >= ctx->zero_point section might leak if it modified a streaming\nwrite folio.  This is unlikely, but with a network filesystem, third party\nchanges can happen.  It also pointed out that __netfs_set_group() would\nleak if called multiple times on the same folio from the \"whole folio\nmodify section\"."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"8f52de0077ba3bf41e5d53d67a185700f41efce7","status":"affected","lessThan":"7f040243c74d72b45b22246c7d9e621fbeab44ac","versionType":"git"},{"version":"8f52de0077ba3bf41e5d53d67a185700f41efce7","status":"affected","lessThan":"551b5c71ee312ca7646ddb605231c1016e8cbb18","versionType":"git"},{"version":"8f52de0077ba3bf41e5d53d67a185700f41efce7","status":"affected","lessThan":"0969ea8370bad0e4fb6131b6a7bed9e7ec522ac7","versionType":"git"},{"version":"8f52de0077ba3bf41e5d53d67a185700f41efce7","status":"affected","lessThan":"ccde2ac757c713535b224233a296de40efe5212d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/netfs/buffered_write.c","include/trace/events/netfs.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.92","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.34","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.11","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/netfs/buffered_write.c","include/trace/events/netfs.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/7f040243c74d72b45b22246c7d9e621fbeab44ac"},{"url":"https://git.kernel.org/stable/c/551b5c71ee312ca7646ddb605231c1016e8cbb18"},{"url":"https://git.kernel.org/stable/c/0969ea8370bad0e4fb6131b6a7bed9e7ec522ac7"},{"url":"https://git.kernel.org/stable/c/ccde2ac757c713535b224233a296de40efe5212d"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-07-19T15:39:39.607Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.12.92"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.18.34"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"7.0.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"7.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}