{"id":24653,"date":"2026-09-16T20:32:36","date_gmt":"2026-09-16T12:32:36","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89966"},"modified":"2026-09-16T20:32:36","modified_gmt":"2026-09-16T12:32:36","slug":"cve-2026-89966","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89966","title":{"rendered":"CVE-2026-89966 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nmm\/hugetlb_cma: fix n"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm\/hugetlb_cma: fix null nodemask dereference in hugetlb_cma_alloc_frozen_folio<\/p>\n<p>alloc_buddy_hugetlb_folio_with_mpol() can pass a NULL nodemask to<br \/>\nalloc_fresh_hugetlb_folio() as a fallback to allocate from all nodes.  If<br \/>\norder is gigantic, alloc_fresh_hugetlb_folio() propagates the NULL<br \/>\nnodemask down to hugetlb_cma_alloc_frozen_folio() via<br \/>\nalloc_gigantic_frozen_folio().<\/p>\n<p>Additionally, hugetlb_cma_alloc_frozen_folio() previously attempted<br \/>\nallocation on hugetlb_cma[nid] without verifying if nid is included in the<br \/>\ncaller&#8217;s nodemask.  Adding a node_isset(nid, *nodemask) check ensures the<br \/>\ninitial preferred node allocation honors the memory policy \/ nodemask.<\/p>\n<p>However, hugetlb_cma_alloc_frozen_folio() dereferences the nodemask in<br \/>\nnode_isset(nid, *nodemask) and for_each_node_mask(node, *nodemask),<br \/>\nleading to a null pointer dereference kernel panic when nodemask is NULL.<\/p>\n<p>Fix this by checking if nodemask is NULL in<br \/>\nhugetlb_cma_alloc_frozen_folio() and defaulting it to<br \/>\ncpuset_current_mems_allowed.  Enclose the allocation attempts within the<br \/>\ncpuset seqcount retry loop so that if the cpuset changes concurrently<br \/>\nduring allocation, the attempts are retried using the updated nodemask.<br \/>\nThis ensures that the initial node check and fallback loop safely honor<br \/>\nthe task&#8217;s cpuset without violating cpuset constraints or causing NULL<br \/>\npointer dereferences or unexpected allocation failures.<\/p>\n<p>From a userspace perspective, this bug allows an unprivileged user to<br \/>\ncrash the kernel (trigger a panic) by requesting a gigantic hugepage<br \/>\nallocation with MPOL_PREFERRED_MANY on a system where CMA is only<br \/>\nconfigured on a subset of NUMA nodes.<\/p>\n<p>This can be reproduced by booting a VM with two NUMA nodes, restricting<br \/>\nCMA to Node 1 (e.g., hugetlb_cma=1:1G default_hugepagesz=1G hugepagesz=1G<br \/>\nhugepages=0), and running a program that allocates a 1GB hugepage area<br \/>\nwithout reserving, restricts allocation to Node 0 using mbind() with<br \/>\nMPOL_PREFERRED_MANY, and triggers a page fault:<\/p>\n<p>  void *ptr = mmap(NULL, 1UL &lt;&lt; 30, PROT_READ | PROT_WRITE,<br \/>\n                   MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB |<br \/>\n                   MAP_HUGE_1GB | MAP_NORESERVE, -1, 0);<br \/>\n  unsigned long nodemask = 1; \/* Node 0 *\/<br \/>\n  mbind(ptr, 1UL &lt;&lt; 30, MPOL_PREFERRED_MANY, &amp;nodemask,<br \/>\n        sizeof(nodemask) * 8, 0);<br \/>\n  memset(ptr, 0, 1UL &lt;&lt; 30); \/* Trigger fault *\/<\/p>\n<p>This results in a NULL pointer dereference:<\/p>\n<p>  BUG: kernel NULL pointer dereference, address: 0000000000000000<br \/>\n  #PF: supervisor read access in kernel mode<br \/>\n  #PF: error_code(0x0000) &#8211; not-present page<br \/>\n  Oops: Oops: 0000 [#1] SMP NOPTI<br \/>\n  RIP: 0010:hugetlb_cma_alloc_frozen_folio+0x75\/0x120<br \/>\n  Call Trace:<\/p>\n<p>   only_alloc_fresh_hugetlb_folio.isra.0+0x2c\/0x160<br \/>\n   alloc_surplus_hugetlb_folio+0x6d\/0x100<br \/>\n   alloc_hugetlb_folio+0x3c5\/0x660<br \/>\n   hugetlb_no_page+0x3d9\/0x650<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm\/hugetlb_cma: fix null nodemask dereference in hugetlb_cma_alloc_frozen_folio<\/p>\n<p>alloc_buddy_hugetlb_folio_with_mpol() can pass a N<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-24653","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/24653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}