{"id":"CVE-2024-35993","summary":"mm: turn folio_test_hugetlb into a PageType","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: turn folio_test_hugetlb into a PageType\n\nThe current folio_test_hugetlb() can be fooled by a concurrent folio split\ninto returning true for a folio which has never belonged to hugetlbfs. \nThis can't happen if the caller holds a refcount on it, but we have a few\nplaces (memory-failure, compaction, procfs) which do not and should not\ntake a speculative reference.\n\nSince hugetlb pages do not use individual page mapcounts (they are always\nfully mapped and use the entire_mapcount field to record the number of\nmappings), the PageType field is available now that page_mapcount()\nignores the value in this field.\n\nIn compaction and with CONFIG_DEBUG_VM enabled, the current implementation\ncan result in an oops, as reported by Luis. This happens since 9c5ccf2db04b\n(\"mm: remove HUGETLB_PAGE_DTOR\") effectively added some VM_BUG_ON() checks\nin the PageHuge() testing path.\n\n[willy@infradead.org: update vmcoreinfo]","modified":"2026-04-02T10:46:51.307395Z","published":"2024-05-20T09:47:57.739Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35993.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/2431b5f2650dfc47ce782d1ca7b02d6b3916976f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9fdcc5b6359dfdaa52a55033bf50e2cedd66eb32"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d99e3140a4d33e26066183ff727d8f02f56bec64"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35993.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-35993"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.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"}}],"schema_version":"1.7.5"}