{"id":"CVE-2026-64158","summary":"netfs: Fix write streaming disablement if fd open O_RDWR","details":"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 -\u003eread_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.","modified":"2026-07-22T03:31:48.091074010Z","published":"2026-07-19T15:40:45.692Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64158.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/616578e40dcba3f94810d841c5a52b7e3bc8ede7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/70a7b9193bbbfceaab5974de66834c64ccc875dd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7a9fa5b020a3a40f8291a71cd44c08d931da430d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9adf8e47d73d5e3c2fe77dea649dcde350ccd65c"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64158.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64158"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"c38f4e96e605f17990e871214e6ea1496bc4e65f"},{"fixed":"9adf8e47d73d5e3c2fe77dea649dcde350ccd65c"},{"fixed":"616578e40dcba3f94810d841c5a52b7e3bc8ede7"},{"fixed":"7a9fa5b020a3a40f8291a71cd44c08d931da430d"},{"fixed":"70a7b9193bbbfceaab5974de66834c64ccc875dd"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-64158.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.8.0"},{"fixed":"6.12.92"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.34"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.0.11"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-64158.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L"}]}