CVE-2026-98844 (GCVE-0-2026-98844)
Vulnerability from cvelistv5
Published
2026-10-18 15:50
Modified
2026-10-19 09:26
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: netfs: clear post-EOF pagecache when extending a file via write Fix netfs to erase the contents of a hole created after the EOF by an ordinary write if dirty data has been previously left there by writes through an mmapped region. Neither the buffered nor the unbuffered/DIO write path clears that stale pagecache. Zero the tail of the folio straddling the EOF before an extending write. That is the only folio that can hold data written past the EOF through an mmap, as pages wholly beyond the EOF can't be faulted in. The folio is zeroed rather than dropped so a concurrent extending write can't lose data. Both write paths downgrade the i_rwsem to shared, so extending writes can run concurrently and the i_size read by the caller may be stale by the time the folio is locked. Re-read i_size under the folio lock and clamp the zeroed range up to it, so a racing write that already put data into the folio isn't clobbered. Wait for any writeback on the folio to finish before zeroing it so that the pagecache isn't modified while it may still be read by the transport during transmission. Honour IOCB_NOWAIT by returning -EAGAIN rather than blocking on the folio lock, on writeback, or in folio_mkclean()'s rmap walk when the folio is mapped. truncate_pagecache() can't be used here: it must be called with the i_rwsem held exclusively, but these write paths only hold it shared, and it would block unconditionally, breaking IOCB_NOWAIT. Callers that hold i_rwsem exclusively for the whole resize (truncate, setattr, fallocate, clone) exclude any genuine concurrent buffered writer, so staleness can instead be decided from the folio's dirty state, as pagecache_isize_extended() already does for filesystems that serialise writes against truncate/setattr via a single i_rwsem. Export netfs_clear_stale_post_isize() helper to handle such case. The helper is required by the CIFS client to fix generic/363.
Impacted products
Vendor Product Version
Linux Linux Version: 153a9961b551101cd38e94e26cd92fbfd198b19b
Version: 153a9961b551101cd38e94e26cd92fbfd198b19b
Version: 153a9961b551101cd38e94e26cd92fbfd198b19b
Version: 153a9961b551101cd38e94e26cd92fbfd198b19b
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "Documentation/filesystems/netfs_library.rst",
            "fs/netfs/buffered_write.c",
            "fs/netfs/direct_write.c",
            "fs/netfs/internal.h",
            "fs/netfs/misc.c",
            "include/linux/netfs.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "f8f7d86b3537e885ee620898a38b749fba8a8456",
              "status": "affected",
              "version": "153a9961b551101cd38e94e26cd92fbfd198b19b",
              "versionType": "git"
            },
            {
              "lessThan": "98f6a4589e0f5f6cf819b8dd45605efc481c06ce",
              "status": "affected",
              "version": "153a9961b551101cd38e94e26cd92fbfd198b19b",
              "versionType": "git"
            },
            {
              "lessThan": "a7036a73671fc83d299bc770710fe996d9fef9ca",
              "status": "affected",
              "version": "153a9961b551101cd38e94e26cd92fbfd198b19b",
              "versionType": "git"
            },
            {
              "lessThan": "69bf14300b50631e7c2271289d347bbd1b19a06c",
              "status": "affected",
              "version": "153a9961b551101cd38e94e26cd92fbfd198b19b",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "Documentation/filesystems/netfs_library.rst",
            "fs/netfs/buffered_write.c",
            "fs/netfs/direct_write.c",
            "fs/netfs/internal.h",
            "fs/netfs/misc.c",
            "include/linux/netfs.h"
          ],
          "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.113",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.56",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.2.*",
              "status": "unaffected",
              "version": "7.2.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.3",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.113",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.56",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2.10",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3",
                  "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: clear post-EOF pagecache when extending a file via write\n\nFix netfs to erase the contents of a hole created after the EOF by an\nordinary write if dirty data has been previously left there by writes\nthrough an mmapped region.  Neither the buffered nor the unbuffered/DIO\nwrite path clears that stale pagecache.\n\nZero the tail of the folio straddling the EOF before an extending\nwrite.  That is the only folio that can hold data written past the EOF\nthrough an mmap, as pages wholly beyond the EOF can\u0027t be faulted in.\nThe folio is zeroed rather than dropped so a concurrent extending write\ncan\u0027t lose data.\n\nBoth write paths downgrade the i_rwsem to shared, so extending writes\ncan run concurrently and the i_size read by the caller may be stale by\nthe time the folio is locked.  Re-read i_size under the folio lock and\nclamp the zeroed range up to it, so a racing write that already put\ndata into the folio isn\u0027t clobbered.\n\nWait for any writeback on the folio to finish before zeroing it so that\nthe pagecache isn\u0027t modified while it may still be read by the transport\nduring transmission.  Honour IOCB_NOWAIT by returning -EAGAIN rather\nthan blocking on the folio lock, on writeback, or in folio_mkclean()\u0027s\nrmap walk when the folio is mapped.\n\ntruncate_pagecache() can\u0027t be used here: it must be called with the\ni_rwsem held exclusively, but these write paths only hold it shared,\nand it would block unconditionally, breaking IOCB_NOWAIT.\n\nCallers that hold i_rwsem exclusively for the whole resize (truncate,\nsetattr, fallocate, clone) exclude any genuine concurrent buffered\nwriter, so staleness can instead be decided from the folio\u0027s dirty\nstate, as pagecache_isize_extended() already does for filesystems that\nserialise writes against truncate/setattr via a single i_rwsem.\nExport netfs_clear_stale_post_isize() helper to handle such case.\n\nThe helper is required by the CIFS client to fix generic/363."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-10-19T09:26:36.394Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/f8f7d86b3537e885ee620898a38b749fba8a8456"
        },
        {
          "url": "https://git.kernel.org/stable/c/98f6a4589e0f5f6cf819b8dd45605efc481c06ce"
        },
        {
          "url": "https://git.kernel.org/stable/c/a7036a73671fc83d299bc770710fe996d9fef9ca"
        },
        {
          "url": "https://git.kernel.org/stable/c/69bf14300b50631e7c2271289d347bbd1b19a06c"
        }
      ],
      "title": "netfs: clear post-EOF pagecache when extending a file via write",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-98844",
    "datePublished": "2026-10-18T15:50:25.256Z",
    "dateReserved": "2026-09-25T10:25:14.373Z",
    "dateUpdated": "2026-10-19T09:26:36.394Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…