{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99506","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-09-25T10:25:14.419Z","datePublished":"2026-11-19T14:43:57.392Z","dateUpdated":"2026-11-22T11:08:39.827Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-11-22T11:08:39.827Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: fix use-after-free of a new anon folio\n\nFor a fault in a private mapping with nothing in the page cache,\nhugetlb_no_page() allocates a folio, locks it and maps it.  The folio has\none reference, which belongs to the page table entry from then on.  After\ndropping the page table lock the function still sets the migratable flag\nof the folio and unlocks it.\n\nWhoever zaps the entry in between frees the folio.  The fault holds the\nfault mutex and the lock of the vma.  MADV_DONTNEED and the first unmap of\na hole punch, hugetlb_vmdelete_list(), do not take the fault mutex, and a\nprivate vma only has a lock if it owns a reservation map: not with\nMAP_NORESERVE, and not in the child after fork().\n\nThen the flag is set in, and folio_unlock() is called on, a folio that is\nfree or has a new owner.  A surplus page goes back to the page allocator\nwhile it is locked:\n\n  BUG: Bad page state in process init  pfn:108e00\n  flags: 0x200000000000059(locked|uptodate|dirty|head|node=0|zone=2)\n  page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set\n\nA page of the pool can be given to the next user, of any file, who locks\nit and loses the lock to the late folio_unlock():\n\n  kernel BUG at mm/filemap.c:1532!\n   hugetlb_no_page+0x111b/0x23e0\n   hugetlb_fault+0x3a9/0x14a0\n\nAn unprivileged process is enough: threads that write to a MAP_PRIVATE |\nMAP_NORESERVE hugetlb mapping, threads that call MADV_DONTNEED on it, and\none that takes the freed pages for another file.\n\nUntil commit 3a47c54f09c4 (\"hugetlbfs: revert use i_mmap_rwsem for more\npmd sharing synchronization\") the fault held i_mmap_rwsem for reading,\nwhich everybody who zaps takes for writing.  The lock that commit\nbf4916922c60 (\"hugetlbfs: extend hugetlb_vma_lock to private VMAs\") gave\nto private vmas closed the window again, but only for those with a\nreservation map.\n\nBe done with the folio before the page table lock is dropped, as\nhugetlb_wp() is with its copy.  The function already unlocks page cache\nfolios under that lock.\n\nOriginal fix generated by an LLM and sent in private by Josef.\n\n[david@kernel.org: simplify+move comment]"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - hugetlb_no_page() is called from hugetlb_fault() when handle_mm_fault() sees a none huge pte. A local process reaches it by faulting its own MAP_PRIVATE hugetlb VMA; the folio is allocated in-kernel, not parsed from a remote protocol message.\nAC:L - The attacker faults and calls madvise(MADV_DONTNEED) on the same VMA. Dontneed reaches __unmap_hugepage_range() through madvise_dontneed_single_vma() and zap_vma_range_batched() and does not take hugetlb_fault_mutex_table. MAP_NORESERVE makes hugetlb_reserve_pages() return before set_vma_resv_map(), so __vma_private_lock() is false and the vma rwsem serializes neither side.\nPR:L - ksys_mmap_pgoff(MAP_ANONYMOUS|MAP_HUGETLB) calls hugetlb_file_setup() with HUGETLB_ANONHUGE_INODE. CAP_IPC_LOCK is required only when creat_flags is HUGETLB_SHMFS_INODE, so an unprivileged process can mmap MAP_PRIVATE|MAP_NORESERVE and fault it.\nUI:N - The attacking process mmaps the hugetlb VMA, faults it, and issues MADV_DONTNEED itself. No other user has to mount media or open a file.\nS:U - folio_set_hugetlb_migratable() and folio_unlock() corrupt a hugetlb struct page in the host kernel. That is kernel memory corruption in the same security authority, not a guest-to-host or IOMMU crossing.\nC:H - On the surplus path free_huge_folio() calls free_frozen_pages(), and set_buddy_order() stores the order in page->private. hugetlb_no_page() then set_bit(HPG_migratable), bit 1 of that word, and folio_unlock() xors PG_locked. A corrupted buddy order makes the next allocation overlap adjacent pages, and dequeue_hugetlb_folio() can hand the same struct page to another file.\nI:H - folio_unlock() in hugetlb_no_page() clears PG_locked on a folio the next owner already holds via folio_lock() or __folio_set_locked() in hugetlb_add_to_page_cache(). set_bit(HPG_migratable) also flips bit 1 of page->private, the buddy order written by set_buddy_order() on the surplus free path.\nA:H - folio_unlock() in hugetlb_no_page() takes VM_BUG_ON_FOLIO(!folio_test_locked) when PG_locked is already clear, the BUG the fix records from hugetlb_no_page in filemap.c. If the xor instead sets PG_locked on the new owner's folio, the next folio_lock() sleeps forever, and a surplus free hits bad_page() on PAGE_FLAGS_CHECK_AT_FREE while the folio is still locked."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/hugetlb.c"],"versions":[{"version":"3a47c54f09c4c89128d8f67d49296b1c25b317d0","lessThan":"727dfb28c6a2334f08cdaef82540137c9b094ab7","status":"affected","versionType":"git"},{"version":"3a47c54f09c4c89128d8f67d49296b1c25b317d0","lessThan":"1108d9a51c91bb459fa62506fd0176dc9e0927c5","status":"affected","versionType":"git"},{"version":"3a47c54f09c4c89128d8f67d49296b1c25b317d0","lessThan":"51b21515bdac0a60efac142dbfa44481e4206f28","status":"affected","versionType":"git"},{"version":"3a47c54f09c4c89128d8f67d49296b1c25b317d0","lessThan":"824cc56bf43c714319992bad3558803cac6e77c0","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/hugetlb.c"],"versions":[{"version":"6.1","status":"affected"},{"version":"0","lessThan":"6.1","status":"unaffected","versionType":"semver"},{"version":"6.12.117","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.61","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.2","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.18.61"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"7.3.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/727dfb28c6a2334f08cdaef82540137c9b094ab7"},{"url":"https://git.kernel.org/stable/c/1108d9a51c91bb459fa62506fd0176dc9e0927c5"},{"url":"https://git.kernel.org/stable/c/51b21515bdac0a60efac142dbfa44481e4206f28"},{"url":"https://git.kernel.org/stable/c/824cc56bf43c714319992bad3558803cac6e77c0"}],"title":"mm/hugetlb: fix use-after-free of a new anon folio","x_generator":{"engine":"bippy-1.2.0"}}}}