GHSA-33FJ-R5RR-5C6M
Vulnerability from github – Published: 2026-11-20 06:32 – Updated: 2026-11-20 06:32In the Linux kernel, the following vulnerability has been resolved:
mm/truncate: look again if a folio left the mapping
invalidate_inode_pages2_range() skips a folio which no longer belongs to the mapping by the time it has got the folio lock, on the assumption that somebody else has removed it from the page cache. But the folio may have been replaced, and then there is a new folio with the same data at that index.
For most cases, like folio migration, that is impossible. However, collapse_file() only checks the refcount of the old folios, under the i_pages lock, and relies on their folio locks from there on. That works for users which repeat the lookup when they find folio->mapping changed. The following scenario is, however, possible:
CPU0 pwrite(O_DIRECT) CPU1 collapse_file() kiocb_invalidate_pages() read the folio (old data), lock it refcount check the write completes copy to new_folio kiocb_invalidate_post_direct_write() find_get_entries() -> old folio xas_store(new_folio) folio->mapping = NULL folio_unlock(folio) folio_lock() folio->mapping != mapping -> continue
In that scenario, the collapsed folio with the data from before the write stays in the page cache after the write has returned.
This used to be impossible, as khugepaged only collapsed files that nobody had open for writing.
Restart the lookup at that index, like shmem_undo_range() does. The same problem seems to exist in truncate_inode_pages_range() as well when truncate_inode_folio() fails, so handle it there as well, but slightly differently: simply check once more through find_get_entries().
{
"affected": [],
"aliases": [
"CVE-2026-99733"
],
"database_specific": {
"cwe_ids": [],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-20T06:18:10Z",
"severity": null
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/truncate: look again if a folio left the mapping\n\ninvalidate_inode_pages2_range() skips a folio which no longer belongs to\nthe mapping by the time it has got the folio lock, on the assumption\nthat somebody else has removed it from the page cache. But the folio may\nhave been replaced, and then there is a new folio with the same data at\nthat index.\n\nFor most cases, like folio migration, that is impossible. However,\ncollapse_file() only checks the refcount of the old folios, under the\ni_pages lock, and relies on their folio locks from there on. That works for\nusers which repeat the lookup when they find folio-\u003emapping changed.\nThe following scenario is, however, possible:\n\n CPU0 pwrite(O_DIRECT) CPU1 collapse_file()\n kiocb_invalidate_pages()\n read the folio (old data), lock it\n refcount check\n the write completes copy to new_folio\n kiocb_invalidate_post_direct_write()\n find_get_entries() -\u003e old folio\n xas_store(new_folio)\n folio-\u003emapping = NULL\n folio_unlock(folio)\n folio_lock()\n folio-\u003emapping != mapping\n -\u003e continue\n\nIn that scenario, the collapsed folio with the data from before the write\nstays in the page cache after the write has returned.\n\nThis used to be impossible, as khugepaged only collapsed files that nobody\nhad open for writing.\n\nRestart the lookup at that index, like shmem_undo_range() does. The same\nproblem seems to exist in truncate_inode_pages_range() as well when\ntruncate_inode_folio() fails, so handle it there as well, but slightly\ndifferently: simply check once more through find_get_entries().",
"id": "GHSA-33fj-r5rr-5c6m",
"modified": "2026-11-20T06:32:09Z",
"published": "2026-11-20T06:32:09Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99733"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/9cf632e139737314afa889ca18122bc3fddb9120"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/f17044fee422605d19e07c4c9f5dc2be7abd7086"
}
],
"schema_version": "1.4.0",
"severity": []
}
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.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
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.