Skip to content
Heist/ feed
Unrated

mm/huge_memory: transfer the pmd dirty bit to the folio on zap

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: mm/huge_memory: transfer the pmd dirty bit to the folio on zap zap_huge_pmd_folio() propagates the pmd young bit to the folio for the file case, but not the dirty bit. The pte path does propagate it, in zap_present_folio_ptes() and so does the pmd split path, in __split_huge_pmd_locked(). For most file mappings the omission is harmless, because writing to a shared file mapping goes through page_mkwrite(), which dirties the folio. tmpfs is different: it has no page_mkwrite(), and vma_wants_writenotify() is false for it, so a *read* fault on a MAP_SHARED tmpfs mapping installs a writable pmd via do_read_fault(). do_read_fault() does not call fault_dirty_shared_page(), so subsequent stores through that mapping set only the hardware dirty bit in the pmd and never call folio_mark_dirty(). A shmem folio allocated by a fault is marked uptodate but not dirty (see the clear: block in shmem_get_folio_gfp()), so PG_dirty is never set at all. Unmapping such a folio - munmap(), or exit_mmap() when the process dies - then loses the only record that it was written, because zap_huge_pmd() drops the pmd without transferring the dirty bit. Reclaim afterwards sees a clean shmem folio: the whole swap-out block in shrink_folio_list() is inside "if (folio_test_dirty(folio))", so pageout() is skipped and the folio falls into __remove_mapping(). There, folio_is_file_lru() is false for a swapbacked folio, so no shadow entry is create

Announced Group revision 1
Original source ↗

CVE-2026-89987

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-89987

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": "b5072380eb619786990cd9eab3ade05d09ccd89e",
        "lessThan": "6e904f9e8cb0e39f60e1cdbea679f89346a563c2",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "b5072380eb619786990cd9eab3ade05d09ccd89e",
        "lessThan": "fd720d3906877b3d2118cd480027e4bc6648f0c5",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "b5072380eb619786990cd9eab3ade05d09ccd89e",
        "lessThan": "effe3cc6d4fdd407457eb30f7b0ef094393f0d64",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "b5072380eb619786990cd9eab3ade05d09ccd89e",
        "lessThan": "9435cddf1378d149d826bd7bd1448a44bf96868d",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "b5072380eb619786990cd9eab3ade05d09ccd89e",
        "lessThan": "fe6cf984939d8e12cb33a99673c8d026c5135e68",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "mm/huge_memory.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "4.8"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "4.8",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.6.160",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.114",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.18.52",
        "versionType": "semver",
        "lessThanOrEqual": "6.18.*"
      },
      {
        "status": "unaffected",
        "version": "7.2.5",
        "versionType": "semver",
        "lessThanOrEqual": "7.2.*"
      },
      {
        "status": "unaffected",
        "version": "7.3",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "mm/huge_memory.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2026-89987

Source reference: /cveMetadata/cveId

Publisher severity

No explicit severity was provided.

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