Skip to content
Heist/ feed
Unrated

netfs: clear post-EOF pagecache when extending a file via write

Type: advisorySource: Official CVE List1 source record

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_

Announced Group revision 1
Original source ↗

CVE-2026-98844

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-98844

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "153a9961b551101cd38e94e26cd92fbfd198b19b",
        "lessThan": "f8f7d86b3537e885ee620898a38b749fba8a8456",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "153a9961b551101cd38e94e26cd92fbfd198b19b",
        "lessThan": "98f6a4589e0f5f6cf819b8dd45605efc481c06ce",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "153a9961b551101cd38e94e26cd92fbfd198b19b",
        "lessThan": "a7036a73671fc83d299bc770710fe996d9fef9ca",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "153a9961b551101cd38e94e26cd92fbfd198b19b",
        "lessThan": "69bf14300b50631e7c2271289d347bbd1b19a06c",
        "versionType": "git"
      }
    ],
    "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"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "6.8"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "6.8",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.12.113",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.18.56",
        "versionType": "semver",
        "lessThanOrEqual": "6.18.*"
      },
      {
        "status": "unaffected",
        "version": "7.2.10",
        "versionType": "semver",
        "lessThanOrEqual": "7.2.*"
      },
      {
        "status": "unaffected",
        "version": "7.3",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "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"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2026-98844

Source reference: /cveMetadata/cveId

Publisher severity

No explicit severity was provided.

Event
#38749 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement