{"api_version":"1","generated_at":"2026-07-20T14:42:00+00:00","cve":"CVE-2026-64158","urls":{"html":"https://cve.report/CVE-2026-64158","api":"https://cve.report/api/cve/CVE-2026-64158.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-64158","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-64158"},"summary":{"title":"netfs: Fix write streaming disablement if fd open O_RDWR","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfs: Fix write streaming disablement if fd open O_RDWR\n\nIn netfs_perform_write(), \"write streaming\" (the caching of dirty data in\ndirty but !uptodate folios) is performed to avoid the need to read data\nthat is just going to get immediately overwritten.  However, this is/will\nbe disabled in three circumstances: if the fd is open O_RDWR, if fscache is\nin use (as we need to round out the blocks for DIO) or if content\nencryption is enabled (again for rounding out purposes).\n\nThe idea behind disabling it if the fd is open O_RDWR is that we'd need to\nflush the write-streaming page before we could read the data, particularly\nthrough mmap.  But netfs now fills in the gaps if ->read_folio() is called\non the page, so that is unnecessary.  Further, this doesn't actually work\nif a separate fd is open for reading.\n\nFix this by removing the check for O_RDWR, thereby allowing streaming\nwrites even when we might read.\n\nThis caused a number of problems with the generic/522 xfstest, but those\nare now fixed.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-07-19 16:17:57","updated_at":"2026-07-19 16:17:57"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/9adf8e47d73d5e3c2fe77dea649dcde350ccd65c","name":"https://git.kernel.org/stable/c/9adf8e47d73d5e3c2fe77dea649dcde350ccd65c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/616578e40dcba3f94810d841c5a52b7e3bc8ede7","name":"https://git.kernel.org/stable/c/616578e40dcba3f94810d841c5a52b7e3bc8ede7","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/70a7b9193bbbfceaab5974de66834c64ccc875dd","name":"https://git.kernel.org/stable/c/70a7b9193bbbfceaab5974de66834c64ccc875dd","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/7a9fa5b020a3a40f8291a71cd44c08d931da430d","name":"https://git.kernel.org/stable/c/7a9fa5b020a3a40f8291a71cd44c08d931da430d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-64158","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64158","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c38f4e96e605f17990e871214e6ea1496bc4e65f 9adf8e47d73d5e3c2fe77dea649dcde350ccd65c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c38f4e96e605f17990e871214e6ea1496bc4e65f 616578e40dcba3f94810d841c5a52b7e3bc8ede7 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c38f4e96e605f17990e871214e6ea1496bc4e65f 7a9fa5b020a3a40f8291a71cd44c08d931da430d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c38f4e96e605f17990e871214e6ea1496bc4e65f 70a7b9193bbbfceaab5974de66834c64ccc875dd git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.8","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.8 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.92 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.34 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0.11 7.0.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/netfs/buffered_write.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"9adf8e47d73d5e3c2fe77dea649dcde350ccd65c","status":"affected","version":"c38f4e96e605f17990e871214e6ea1496bc4e65f","versionType":"git"},{"lessThan":"616578e40dcba3f94810d841c5a52b7e3bc8ede7","status":"affected","version":"c38f4e96e605f17990e871214e6ea1496bc4e65f","versionType":"git"},{"lessThan":"7a9fa5b020a3a40f8291a71cd44c08d931da430d","status":"affected","version":"c38f4e96e605f17990e871214e6ea1496bc4e65f","versionType":"git"},{"lessThan":"70a7b9193bbbfceaab5974de66834c64ccc875dd","status":"affected","version":"c38f4e96e605f17990e871214e6ea1496bc4e65f","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/netfs/buffered_write.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.8"},{"lessThan":"6.8","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.92","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.34","versionType":"semver"},{"lessThanOrEqual":"7.0.*","status":"unaffected","version":"7.0.11","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.92","versionStartIncluding":"6.8","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.34","versionStartIncluding":"6.8","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.0.11","versionStartIncluding":"6.8","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.1","versionStartIncluding":"6.8","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfs: Fix write streaming disablement if fd open O_RDWR\n\nIn netfs_perform_write(), \"write streaming\" (the caching of dirty data in\ndirty but !uptodate folios) is performed to avoid the need to read data\nthat is just going to get immediately overwritten.  However, this is/will\nbe disabled in three circumstances: if the fd is open O_RDWR, if fscache is\nin use (as we need to round out the blocks for DIO) or if content\nencryption is enabled (again for rounding out purposes).\n\nThe idea behind disabling it if the fd is open O_RDWR is that we'd need to\nflush the write-streaming page before we could read the data, particularly\nthrough mmap.  But netfs now fills in the gaps if ->read_folio() is called\non the page, so that is unnecessary.  Further, this doesn't actually work\nif a separate fd is open for reading.\n\nFix this by removing the check for O_RDWR, thereby allowing streaming\nwrites even when we might read.\n\nThis caused a number of problems with the generic/522 xfstest, but those\nare now fixed."}],"providerMetadata":{"dateUpdated":"2026-07-19T15:40:45.692Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/9adf8e47d73d5e3c2fe77dea649dcde350ccd65c"},{"url":"https://git.kernel.org/stable/c/616578e40dcba3f94810d841c5a52b7e3bc8ede7"},{"url":"https://git.kernel.org/stable/c/7a9fa5b020a3a40f8291a71cd44c08d931da430d"},{"url":"https://git.kernel.org/stable/c/70a7b9193bbbfceaab5974de66834c64ccc875dd"}],"title":"netfs: Fix write streaming disablement if fd open O_RDWR","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-64158","datePublished":"2026-07-19T15:40:45.692Z","dateReserved":"2026-07-19T07:54:57.038Z","dateUpdated":"2026-07-19T15:40:45.692Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-07-19 16:17:57","lastModifiedDate":"2026-07-19 16:17:57","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"64158","Ordinal":"1","Title":"netfs: Fix write streaming disablement if fd open O_RDWR","CVE":"CVE-2026-64158","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"64158","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfs: Fix write streaming disablement if fd open O_RDWR\n\nIn netfs_perform_write(), \"write streaming\" (the caching of dirty data in\ndirty but !uptodate folios) is performed to avoid the need to read data\nthat is just going to get immediately overwritten.  However, this is/will\nbe disabled in three circumstances: if the fd is open O_RDWR, if fscache is\nin use (as we need to round out the blocks for DIO) or if content\nencryption is enabled (again for rounding out purposes).\n\nThe idea behind disabling it if the fd is open O_RDWR is that we'd need to\nflush the write-streaming page before we could read the data, particularly\nthrough mmap.  But netfs now fills in the gaps if ->read_folio() is called\non the page, so that is unnecessary.  Further, this doesn't actually work\nif a separate fd is open for reading.\n\nFix this by removing the check for O_RDWR, thereby allowing streaming\nwrites even when we might read.\n\nThis caused a number of problems with the generic/522 xfstest, but those\nare now fixed.","Type":"Description","Title":"netfs: Fix write streaming disablement if fd open O_RDWR"}]}}}