CVE-2026-64158 (GCVE-0-2026-64158)

Vulnerability from cvelistv5 – Published: 2026-07-19 15:40 – Updated: 2026-08-05 12:39
VLAI
Title
netfs: Fix write streaming disablement if fd open O_RDWR
Summary
In the Linux kernel, the following vulnerability has been resolved: netfs: Fix write streaming disablement if fd open O_RDWR In netfs_perform_write(), "write streaming" (the caching of dirty data in dirty but !uptodate folios) is performed to avoid the need to read data that is just going to get immediately overwritten. However, this is/will be disabled in three circumstances: if the fd is open O_RDWR, if fscache is in use (as we need to round out the blocks for DIO) or if content encryption is enabled (again for rounding out purposes). The idea behind disabling it if the fd is open O_RDWR is that we'd need to flush the write-streaming page before we could read the data, particularly through mmap. But netfs now fills in the gaps if ->read_folio() is called on the page, so that is unnecessary. Further, this doesn't actually work if a separate fd is open for reading. Fix this by removing the check for O_RDWR, thereby allowing streaming writes even when we might read. This caused a number of problems with the generic/522 xfstest, but those are now fixed.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: c38f4e96e605f17990e871214e6ea1496bc4e65f , < 9adf8e47d73d5e3c2fe77dea649dcde350ccd65c (git)
Affected: c38f4e96e605f17990e871214e6ea1496bc4e65f , < 616578e40dcba3f94810d841c5a52b7e3bc8ede7 (git)
Affected: c38f4e96e605f17990e871214e6ea1496bc4e65f , < 7a9fa5b020a3a40f8291a71cd44c08d931da430d (git)
Affected: c38f4e96e605f17990e871214e6ea1496bc4e65f , < 70a7b9193bbbfceaab5974de66834c64ccc875dd (git)
Create a notification for this product.
Linux Linux Affected: 6.8
Unaffected: 0 , < 6.8 (semver)
Unaffected: 6.12.92 , ≤ 6.12.* (semver)
Unaffected: 6.18.34 , ≤ 6.18.* (semver)
Unaffected: 7.0.11 , ≤ 7.0.* (semver)
Unaffected: 7.1 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "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\u0027d 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\u0027t 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."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.3,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The bug is reached through local VFS syscalls (write/read/mmap) on netfs-backed mounts (CIFS, AFS, 9p); it is client-side pagecache logic, not remote packet handling in ksmbd/nfsd.\nAC:L - An attacker can reliably trigger the race by opening O_WRONLY and O_RDONLY on the same file and interleaving writes and reads; fsx/generic/522 reproduce this deterministically on default CIFS without fscache.\nPR:L - Exploitation requires a local user with permission to open and write the target file on a mounted network filesystem; no real root or init-namespace capabilities are needed.\nUI:N - The attacker can create both file descriptors and drive the interleaved I/O themselves; no separate victim action is required to reach the vulnerable code path.\nS:U - Impact is confined to pagecache coherency on the local kernel\u0027s netfs client; it does not cross VM, container, or IOMMU security boundaries.\nC:H - Streaming writes leave dirty but !uptodate folios with unfilled gaps; concurrent reads via a separate fd can return stale or uninitialized pagecache bytes instead of correct file data, constituting meaningful information disclosure.\nI:H - The coherency failure corrupts pagecache contents and can persist incorrect data back to the remote filesystem via writeback, enabling arbitrary modification of file data within the attacker\u0027s writable regions.\nA:L - Corrupt streaming-write folio state can cause mmap faults (SIGBUS from netfs_page_mkwrite on !uptodate folios) and degraded I/O reliability, though a kernel panic is not the primary demonstrated outcome for this specific flaw."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:39:49.120Z",
        "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-08-05T12:39:49.120Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-64158",
      "date": "2026-08-11",
      "epss": "0.00085",
      "percentile": "0.00364"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-64158\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-07-19T16:17:57.807\",\"lastModified\":\"2026-07-30T14:59:47.950\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"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\u0027d 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\u0027t 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.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"fs/netfs/buffered_write.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"c38f4e96e605f17990e871214e6ea1496bc4e65f\",\"lessThan\":\"9adf8e47d73d5e3c2fe77dea649dcde350ccd65c\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"c38f4e96e605f17990e871214e6ea1496bc4e65f\",\"lessThan\":\"616578e40dcba3f94810d841c5a52b7e3bc8ede7\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"c38f4e96e605f17990e871214e6ea1496bc4e65f\",\"lessThan\":\"7a9fa5b020a3a40f8291a71cd44c08d931da430d\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"c38f4e96e605f17990e871214e6ea1496bc4e65f\",\"lessThan\":\"70a7b9193bbbfceaab5974de66834c64ccc875dd\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"fs/netfs/buffered_write.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.8\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.8\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.92\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18.34\",\"lessThanOrEqual\":\"6.18.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.0.11\",\"lessThanOrEqual\":\"7.0.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.1\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L\",\"baseScore\":7.3,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"LOW\"},\"exploitabilityScore\":1.8,\"impactScore\":5.5}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/616578e40dcba3f94810d841c5a52b7e3bc8ede7\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/70a7b9193bbbfceaab5974de66834c64ccc875dd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/7a9fa5b020a3a40f8291a71cd44c08d931da430d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9adf8e47d73d5e3c2fe77dea649dcde350ccd65c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Low",
      "current_release_date": "2026-07-21T09:07:51+00:00",
      "cve": "CVE-2026-64158",
      "id": "CVE-2026-64158",
      "initial_release_date": "2026-07-19T00:00:00+00:00",
      "product_status:known_affected": "76",
      "product_status:known_not_affected": "199",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: netfs: Fix write streaming disablement if fd open O_RDWR",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-64158.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "low",
      "current_release_date": "2026-08-07T23:45:16Z",
      "cve": "CVE-2026-64158",
      "id": "CVE-2026-64158",
      "initial_release_date": "2026-07-21T12:58:39Z",
      "product_status:known_affected": "17",
      "product_status:known_not_affected": "267",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2026-64158",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2026-64158.json",
      "version": "4"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…