GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2026-89987 (GCVE-0-2026-89987)

Vulnerability from cvelistv5 – Published: 2026-09-16 10:33 – Updated: 2026-09-16 10:33
VLAI
Title
mm/huge_memory: transfer the pmd dirty bit to the folio on zap
Summary
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 created and __filemap_remove_folio(folio, NULL) simply empties the i_pages slot. The data is freed without ever being written to swap, and the next fault on that index returns a freshly zeroed folio. This is silent data loss for any process that keeps state in a MAP_SHARED tmpfs segment across an unmap - for example a cache handed from one process generation to the next through /dev/shm. It requires the folio to be PMD-mapped, so it only shows up once shmem THP is enabled (which is what we did in Meta fleet and started noticing crashes); with THP off the pte path transfers the dirty bit correctly. It also only becomes visible when swap is enabled, because with no swap device shmem folios (which are on the anon LRU) are not scanned by reclaim at all, so the clean folio is never dropped. Reproduced on x86_64 with a tmpfs mounted huge=within_size: read-fault a 2MB-backed region, write a known pattern through the resulting mapping, munmap, force reclaim of the cgroup, then re-map and read back. Without this patch the region reads back as zeros and vmstat shows zswpout 0 - the data was discarded rather than swapped. With this patch the region reads back correctly and the pages are swapped out as expected. With huge=never, or when the first touch is a write, the test passes either way.
Severity
No CVSS data available.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: b5072380eb619786990cd9eab3ade05d09ccd89e , < effe3cc6d4fdd407457eb30f7b0ef094393f0d64 (git)
Affected: b5072380eb619786990cd9eab3ade05d09ccd89e , < 9435cddf1378d149d826bd7bd1448a44bf96868d (git)
Affected: b5072380eb619786990cd9eab3ade05d09ccd89e , < fe6cf984939d8e12cb33a99673c8d026c5135e68 (git)
guessed Create a notification for this product.
Linux Linux Affected: 4.8
Unaffected: 0 , < 4.8 (semver)
Unaffected: 6.18.52 , ≤ 6.18.* (semver)
Unaffected: 7.2.5 , ≤ 7.2.* (semver)
Unaffected: 7.3-rc2 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "mm/huge_memory.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "effe3cc6d4fdd407457eb30f7b0ef094393f0d64",
              "status": "affected",
              "version": "b5072380eb619786990cd9eab3ade05d09ccd89e",
              "versionType": "git"
            },
            {
              "lessThan": "9435cddf1378d149d826bd7bd1448a44bf96868d",
              "status": "affected",
              "version": "b5072380eb619786990cd9eab3ade05d09ccd89e",
              "versionType": "git"
            },
            {
              "lessThan": "fe6cf984939d8e12cb33a99673c8d026c5135e68",
              "status": "affected",
              "version": "b5072380eb619786990cd9eab3ade05d09ccd89e",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "mm/huge_memory.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.8"
            },
            {
              "lessThan": "4.8",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.52",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.2.*",
              "status": "unaffected",
              "version": "7.2.5",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.3-rc2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.52",
                  "versionStartIncluding": "4.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2.5",
                  "versionStartIncluding": "4.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3-rc2",
                  "versionStartIncluding": "4.8",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/huge_memory: transfer the pmd dirty bit to the folio on zap\n\nzap_huge_pmd_folio() propagates the pmd young bit to the folio for the\nfile case, but not the dirty bit.  The pte path does propagate it, in\nzap_present_folio_ptes() and so does the pmd split path, in\n__split_huge_pmd_locked().\n\nFor most file mappings the omission is harmless, because writing to a\nshared file mapping goes through page_mkwrite(), which dirties the folio. \ntmpfs is different: it has no page_mkwrite(), and vma_wants_writenotify()\nis false for it, so a *read* fault on a MAP_SHARED tmpfs mapping installs\na writable pmd via do_read_fault().  do_read_fault() does not call\nfault_dirty_shared_page(), so subsequent stores through that mapping set\nonly the hardware dirty bit in the pmd and never call folio_mark_dirty(). \nA shmem folio allocated by a fault is marked uptodate but not dirty (see\nthe clear: block in shmem_get_folio_gfp()), so PG_dirty is never set at\nall.\n\nUnmapping such a folio - munmap(), or exit_mmap() when the process dies -\nthen loses the only record that it was written, because zap_huge_pmd()\ndrops the pmd without transferring the dirty bit.  Reclaim afterwards sees\na clean shmem folio: the whole swap-out block in shrink_folio_list() is\ninside \"if (folio_test_dirty(folio))\", so pageout() is skipped and the\nfolio falls into __remove_mapping().  There, folio_is_file_lru() is false\nfor a swapbacked folio, so no shadow entry is created and\n__filemap_remove_folio(folio, NULL) simply empties the i_pages slot.  The\ndata is freed without ever being written to swap, and the next fault on\nthat index returns a freshly zeroed folio.\n\nThis is silent data loss for any process that keeps state in a MAP_SHARED\ntmpfs segment across an unmap - for example a cache handed from one\nprocess generation to the next through /dev/shm.  It requires the folio to\nbe PMD-mapped, so it only shows up once shmem THP is enabled (which is\nwhat we did in Meta fleet and started noticing crashes); with THP off the\npte path transfers the dirty bit correctly.  It also only becomes visible\nwhen swap is enabled, because with no swap device shmem folios (which are\non the anon LRU) are not scanned by reclaim at all, so the clean folio is\nnever dropped.\n\nReproduced on x86_64 with a tmpfs mounted huge=within_size: read-fault a\n2MB-backed region, write a known pattern through the resulting mapping,\nmunmap, force reclaim of the cgroup, then re-map and read back.  Without\nthis patch the region reads back as zeros and vmstat shows zswpout 0 - the\ndata was discarded rather than swapped.  With this patch the region reads\nback correctly and the pages are swapped out as expected.  With\nhuge=never, or when the first touch is a write, the test passes either\nway."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-09-16T10:33:02.270Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/effe3cc6d4fdd407457eb30f7b0ef094393f0d64"
        },
        {
          "url": "https://git.kernel.org/stable/c/9435cddf1378d149d826bd7bd1448a44bf96868d"
        },
        {
          "url": "https://git.kernel.org/stable/c/fe6cf984939d8e12cb33a99673c8d026c5135e68"
        }
      ],
      "title": "mm/huge_memory: transfer the pmd dirty bit to the folio on zap",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-89987",
    "datePublished": "2026-09-16T10:33:02.270Z",
    "dateReserved": "2026-09-11T19:38:34.779Z",
    "dateUpdated": "2026-09-16T10:33:02.270Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-89987",
      "date": "2026-09-17",
      "epss": "0.00198",
      "percentile": "0.09841"
    },
    "microsoft_vex": {
      "current_release_date": "2026-09-17T01:06:02.000Z",
      "cve": "CVE-2026-89987",
      "id": "msrc_CVE-2026-89987",
      "initial_release_date": "2026-09-17T01:06:02.000Z",
      "product_status:known_affected": "1",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "mm/huge_memory: transfer the pmd dirty bit to the folio on zap",
      "url": "https://msrc.microsoft.com/csaf/vex/2026/msrc_cve-2026-89987.json",
      "version": "1"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-89987\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-09-16T11:17:09.767\",\"lastModified\":\"2026-09-16T11:17:09.767\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nmm/huge_memory: transfer the pmd dirty bit to the folio on zap\\n\\nzap_huge_pmd_folio() propagates the pmd young bit to the folio for the\\nfile case, but not the dirty bit.  The pte path does propagate it, in\\nzap_present_folio_ptes() and so does the pmd split path, in\\n__split_huge_pmd_locked().\\n\\nFor most file mappings the omission is harmless, because writing to a\\nshared file mapping goes through page_mkwrite(), which dirties the folio. \\ntmpfs is different: it has no page_mkwrite(), and vma_wants_writenotify()\\nis false for it, so a *read* fault on a MAP_SHARED tmpfs mapping installs\\na writable pmd via do_read_fault().  do_read_fault() does not call\\nfault_dirty_shared_page(), so subsequent stores through that mapping set\\nonly the hardware dirty bit in the pmd and never call folio_mark_dirty(). \\nA shmem folio allocated by a fault is marked uptodate but not dirty (see\\nthe clear: block in shmem_get_folio_gfp()), so PG_dirty is never set at\\nall.\\n\\nUnmapping such a folio - munmap(), or exit_mmap() when the process dies -\\nthen loses the only record that it was written, because zap_huge_pmd()\\ndrops the pmd without transferring the dirty bit.  Reclaim afterwards sees\\na clean shmem folio: the whole swap-out block in shrink_folio_list() is\\ninside \\\"if (folio_test_dirty(folio))\\\", so pageout() is skipped and the\\nfolio falls into __remove_mapping().  There, folio_is_file_lru() is false\\nfor a swapbacked folio, so no shadow entry is created and\\n__filemap_remove_folio(folio, NULL) simply empties the i_pages slot.  The\\ndata is freed without ever being written to swap, and the next fault on\\nthat index returns a freshly zeroed folio.\\n\\nThis is silent data loss for any process that keeps state in a MAP_SHARED\\ntmpfs segment across an unmap - for example a cache handed from one\\nprocess generation to the next through /dev/shm.  It requires the folio to\\nbe PMD-mapped, so it only shows up once shmem THP is enabled (which is\\nwhat we did in Meta fleet and started noticing crashes); with THP off the\\npte path transfers the dirty bit correctly.  It also only becomes visible\\nwhen swap is enabled, because with no swap device shmem folios (which are\\non the anon LRU) are not scanned by reclaim at all, so the clean folio is\\nnever dropped.\\n\\nReproduced on x86_64 with a tmpfs mounted huge=within_size: read-fault a\\n2MB-backed region, write a known pattern through the resulting mapping,\\nmunmap, force reclaim of the cgroup, then re-map and read back.  Without\\nthis patch the region reads back as zeros and vmstat shows zswpout 0 - the\\ndata was discarded rather than swapped.  With this patch the region reads\\nback correctly and the pages are swapped out as expected.  With\\nhuge=never, or when the first touch is a write, the test passes either\\nway.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"mm/huge_memory.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"b5072380eb619786990cd9eab3ade05d09ccd89e\",\"lessThan\":\"effe3cc6d4fdd407457eb30f7b0ef094393f0d64\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"b5072380eb619786990cd9eab3ade05d09ccd89e\",\"lessThan\":\"9435cddf1378d149d826bd7bd1448a44bf96868d\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"b5072380eb619786990cd9eab3ade05d09ccd89e\",\"lessThan\":\"fe6cf984939d8e12cb33a99673c8d026c5135e68\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"mm/huge_memory.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"4.8\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"4.8\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18.52\",\"lessThanOrEqual\":\"6.18.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.2.5\",\"lessThanOrEqual\":\"7.2.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.3-rc2\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/9435cddf1378d149d826bd7bd1448a44bf96868d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/effe3cc6d4fdd407457eb30f7b0ef094393f0d64\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/fe6cf984939d8e12cb33a99673c8d026c5135e68\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}



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…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…