CVE-2026-89987 (GCVE-0-2026-89987)
Vulnerability from cvelistv5
Published
2026-09-16 10:33
Modified
2026-10-30 12:33
Severity ?
VLAI Severity ?
EPSS score ?
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.
References
Impacted products
| Vendor | Product | Version | ||
|---|---|---|---|---|
| Linux | Linux |
Version: b5072380eb619786990cd9eab3ade05d09ccd89e Version: b5072380eb619786990cd9eab3ade05d09ccd89e Version: b5072380eb619786990cd9eab3ade05d09ccd89e Version: b5072380eb619786990cd9eab3ade05d09ccd89e Version: b5072380eb619786990cd9eab3ade05d09ccd89e Version: b5072380eb619786990cd9eab3ade05d09ccd89e Version: b5072380eb619786990cd9eab3ade05d09ccd89e Version: b5072380eb619786990cd9eab3ade05d09ccd89e |
||
{
"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": "79d8c89baa10612c1675972a632c65cdbe0936f6",
"status": "affected",
"version": "b5072380eb619786990cd9eab3ade05d09ccd89e",
"versionType": "git"
},
{
"lessThan": "13f4910d81b62a214cdb28b47237198fa96078a2",
"status": "affected",
"version": "b5072380eb619786990cd9eab3ade05d09ccd89e",
"versionType": "git"
},
{
"lessThan": "7a4c3f7b47ba34b021a7747081f330bfb76a4271",
"status": "affected",
"version": "b5072380eb619786990cd9eab3ade05d09ccd89e",
"versionType": "git"
},
{
"lessThan": "6e904f9e8cb0e39f60e1cdbea679f89346a563c2",
"status": "affected",
"version": "b5072380eb619786990cd9eab3ade05d09ccd89e",
"versionType": "git"
},
{
"lessThan": "fd720d3906877b3d2118cd480027e4bc6648f0c5",
"status": "affected",
"version": "b5072380eb619786990cd9eab3ade05d09ccd89e",
"versionType": "git"
},
{
"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": "5.10.*",
"status": "unaffected",
"version": "5.10.273",
"versionType": "semver"
},
{
"lessThanOrEqual": "5.15.*",
"status": "unaffected",
"version": "5.15.224",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.1.*",
"status": "unaffected",
"version": "6.1.191",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.6.*",
"status": "unaffected",
"version": "6.6.160",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.12.*",
"status": "unaffected",
"version": "6.12.114",
"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",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.10.273",
"versionStartIncluding": "4.8",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.15.224",
"versionStartIncluding": "4.8",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.1.191",
"versionStartIncluding": "4.8",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.6.160",
"versionStartIncluding": "4.8",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.12.114",
"versionStartIncluding": "4.8",
"vulnerable": true
},
{
"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",
"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-10-30T12:33:41.932Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/79d8c89baa10612c1675972a632c65cdbe0936f6"
},
{
"url": "https://git.kernel.org/stable/c/13f4910d81b62a214cdb28b47237198fa96078a2"
},
{
"url": "https://git.kernel.org/stable/c/7a4c3f7b47ba34b021a7747081f330bfb76a4271"
},
{
"url": "https://git.kernel.org/stable/c/6e904f9e8cb0e39f60e1cdbea679f89346a563c2"
},
{
"url": "https://git.kernel.org/stable/c/fd720d3906877b3d2118cd480027e4bc6648f0c5"
},
{
"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-10-30T12:33:41.932Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
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…