mm: turn folio_test_hugetlb into a PageType
In the Linux kernel, the following vulnerability has been resolved: mm: turn folio_test_hugetlb into a PageType The current folio_test_hugetlb() can be fooled by a concurrent folio split into returning true for a folio which has never belonged to hugetlbfs. This can't happen if the caller holds a refcount on it, but we have a few places (memory-failure, compaction, procfs) which do not and should not take a speculative reference. Since hugetlb pages do not use individual page mapcounts (they are always fully mapped and use the entire_mapcount field to record the number of mappings), the PageType field is available now that page_mapcount() ignores the value in this field. In compaction and with CONFIG_DEBUG_VM enabled, the current implementation can result in an oops, as reported by Luis. This happens since 9c5ccf2db04b ("mm: remove HUGETLB_PAGE_DTOR") effectively added some VM_BUG_ON() checks in the PageHuge() testing path. [willy@infradead.org: update vmcoreinfo]
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.6.30, 6.8.9
- CVEs
- CVE-2024-35993
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 04:25 UTC · Revision 1
Source evidence
mm: turn folio_test_hugetlb into a PageType
core-osv · Original sourcePublished 20 May 2024, 09:47 UTC
In the Linux kernel, the following vulnerability has been resolved: mm: turn folio_test_hugetlb into a PageType The current folio_test_hugetlb() can be fooled by a concurrent folio split into returning true for a folio which has never belonged to hugetlbfs. This can't happen if the caller holds a refcount on it, but we have a few places (memory-failure, compaction, procfs) which do not and should not take a speculative reference. Since hugetlb pages do not use individual page mapcounts (they are always fully mapped and use the entire_mapcount field to record the number of mappings), the PageType field is available now that page_mapcount() ignores the value in this field. In compaction and with CONFIG_DEBUG_VM enabled, the current implementation can result in an oops, as reported by Luis. This happens since 9c5ccf2db04b ("mm: remove HUGETLB_PAGE_DTOR") effectively added some VM_BUG_ON() checks in the PageHuge() testing path. [willy@infradead.org: update vmcoreinfo]
osv:CVE-2024-35993
Kernel
Fixed versions: 6.6.30, 6.8.9
Complete source record
{
"id": "d7cb31f2882312fef763d699e39426b8a79d974c83b1735c382bd95c67a4f118",
"url": "https://osv.dev/vulnerability/CVE-2024-35993",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "mm: turn folio_test_hugetlb into a PageType",
"summary": "In the Linux kernel, the following vulnerability has been resolved: mm: turn folio_test_hugetlb into a PageType The current folio_test_hugetlb() can be fooled by a concurrent folio split into returning true for a folio which has never belonged to hugetlbfs. This can't happen if the caller holds a refcount on it, but we have a few places (memory-failure, compaction, procfs) which do not and should not take a speculative reference. Since hugetlb pages do not use individual page mapcounts (they are always fully mapped and use the entire_mapcount field to record the number of mappings), the PageType field is available now that page_mapcount() ignores the value in this field. In compaction and with CONFIG_DEBUG_VM enabled, the current implementation can result in an oops, as reported by Luis. This happens since 9c5ccf2db04b (\"mm: remove HUGETLB_PAGE_DTOR\") effectively added some VM_BUG_ON() checks in the PageHuge() testing path. [willy@infradead.org: update vmcoreinfo]",
"evidence": "osv:CVE-2024-35993",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.6.30",
"evidence": "/affected/1/ranges"
},
{
"value": "6.8.9",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2024-35993",
"aliases": [
"CVE-2024-35993"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "9c5ccf2db04b8d7c3df363fdd4856c2b79ab2c6a"
},
{
"fixed": "2431b5f2650dfc47ce782d1ca7b02d6b3916976f"
},
{
"fixed": "9fdcc5b6359dfdaa52a55033bf50e2cedd66eb32"
},
{
"fixed": "d99e3140a4d33e26066183ff727d8f02f56bec64"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-35993.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.6.0"
},
{
"fixed": "6.6.30"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.8.9"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-35993.json"
}
}
],
"modified": "2026-10-28T02:30:33.522095110Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/2431b5f2650dfc47ce782d1ca7b02d6b3916976f",
"https://git.kernel.org/stable/c/9fdcc5b6359dfdaa52a55033bf50e2cedd66eb32",
"https://git.kernel.org/stable/c/d99e3140a4d33e26066183ff727d8f02f56bec64",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35993.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-35993",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35993.json"
}
},
"related_cves": [
{
"value": "CVE-2024-35993",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 500271,
"published_at": "2024-05-20T09:47:57.739+00:00"
}