# CVE-2026-89966: mm/hugetlb\_cma: fix null nodemask dereference in hugetlb\_cma\_alloc\_frozen\_folio

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.20% (percentile 5, 2026-11-26)
- **Published:** 2026-09-16T10:32:47.482Z
- **Modified:** 2026-10-19T09:18:43.030Z

## Who should check

- Anyone running Linux \>= eb02f14c4a2bf4c242d91c4a5d7fb57c3c0ad1b1, \< 10f616ef06c5bd2d656a0eebaf73f9b09d150c24; \>= eb02f14c4a2bf4c242d91c4a5d7fb57c3c0ad1b1, \< 7b8a8ae4dd176a232e973017d2aa3c536a7275e2
- Anyone running Linux 6.19

## Description

In the Linux kernel, the following vulnerability has been resolved:

mm/hugetlb\_cma: fix null nodemask dereference in hugetlb\_cma\_alloc\_frozen\_folio

alloc\_buddy\_hugetlb\_folio\_with\_mpol() can pass a NULL nodemask to
alloc\_fresh\_hugetlb\_folio() as a fallback to allocate from all nodes.  If
order is gigantic, alloc\_fresh\_hugetlb\_folio() propagates the NULL
nodemask down to hugetlb\_cma\_alloc\_frozen\_folio() via
alloc\_gigantic\_frozen\_folio().

Additionally, hugetlb\_cma\_alloc\_frozen\_folio() previously attempted
allocation on hugetlb\_cma\[nid\] without verifying if nid is included in the
caller's nodemask.  Adding a node\_isset(nid, \*nodemask) check ensures the
initial preferred node allocation honors the memory policy / nodemask.

However, hugetlb\_cma\_alloc\_frozen\_folio() dereferences the nodemask in
node\_isset(nid, \*nodemask) and for\_each\_node\_mask(node, \*nodemask),
leading to a null pointer dereference kernel panic when nodemask is NULL.

Fix this by checking if nodemask is NULL in
hugetlb\_cma\_alloc\_frozen\_folio() and defaulting it to
cpuset\_current\_mems\_allowed.  Enclose the allocation attempts within the
cpuset seqcount retry loop so that if the cpuset changes concurrently
during allocation, the attempts are retried using the updated nodemask. 
This ensures that the initial node check and fallback loop safely honor
the task's cpuset without violating cpuset constraints or causing NULL
pointer dereferences or unexpected allocation failures.

From a userspace perspective, this bug allows an unprivileged user to
crash the kernel (trigger a panic) by requesting a gigantic hugepage
allocation with MPOL\_PREFERRED\_MANY on a system where CMA is only
configured on a subset of NUMA nodes.

This can be reproduced by booting a VM with two NUMA nodes, restricting
CMA to Node 1 (e.g., hugetlb\_cma=1:1G default\_hugepagesz=1G hugepagesz=1G
hugepages=0), and running a program that allocates a 1GB hugepage area
without reserving, restricts allocation to Node 0 using mbind() with
MPOL\_PREFERRED\_MANY, and triggers a page fault:

  void \*ptr = mmap(NULL, 1UL \<\< 30, PROT\_READ \| PROT\_WRITE,
                   MAP\_PRIVATE \| MAP\_ANONYMOUS \| MAP\_HUGETLB \|
                   MAP\_HUGE\_1GB \| MAP\_NORESERVE, -1, 0);
  unsigned long nodemask = 1; /\* Node 0 \*/
  mbind(ptr, 1UL \<\< 30, MPOL\_PREFERRED\_MANY, &nodemask,
        sizeof(nodemask) \* 8, 0);
  memset(ptr, 0, 1UL \<\< 30); /\* Trigger fault \*/

This results in a NULL pointer dereference:

  BUG: kernel NULL pointer dereference, address: 0000000000000000
  \#PF: supervisor read access in kernel mode
  \#PF: error\_code(0x0000) - not-present page
  Oops: Oops: 0000 \[\#1\] SMP NOPTI
  RIP: 0010:hugetlb\_cma\_alloc\_frozen\_folio+0x75/0x120
  Call Trace:
   \<TASK\>
   only\_alloc\_fresh\_hugetlb\_folio.isra.0+0x2c/0x160
   alloc\_surplus\_hugetlb\_folio+0x6d/0x100
   alloc\_hugetlb\_folio+0x3c5/0x660
   hugetlb\_no\_page+0x3d9/0x650

## Affected and fixed versions

- Linux: \>= eb02f14c4a2bf4c242d91c4a5d7fb57c3c0ad1b1, \< 10f616ef06c5bd2d656a0eebaf73f9b09d150c24; \>= eb02f14c4a2bf4c242d91c4a5d7fb57c3c0ad1b1, \< 7b8a8ae4dd176a232e973017d2aa3c536a7275e2 (cvelist)
- Linux: 6.19 (cvelist)

## Mitigation

- Upgrade Linux to 7b8a8ae4dd176a232e973017d2aa3c536a7275e2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-89966. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-89966.md
Affected: Linux >= eb02f14c4a2bf4c242d91c4a5d7fb57c3c0ad1b1, < 10f616ef06c5bd2d656a0eebaf73f9b09d150c24; >= eb02f14c4a2bf4c242d91c4a5d7fb57c3c0ad1b1, < 7b8a8ae4dd176a232e973017d2aa3c536a7275e2; Linux 6.19
Fixed in: Linux 10f616ef06c5bd2d656a0eebaf73f9b09d150c24, Linux 7b8a8ae4dd176a232e973017d2aa3c536a7275e2

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-89966 being exploited?

There is no confirmed exploitation: CVE-2026-89966 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.20% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-89966?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-89966?

Linux \>= eb02f14c4a2bf4c242d91c4a5d7fb57c3c0ad1b1, \< 10f616ef06c5bd2d656a0eebaf73f9b09d150c24; \>= eb02f14c4a2bf4c242d91c4a5d7fb57c3c0ad1b1, \< 7b8a8ae4dd176a232e973017d2aa3c536a7275e2; Linux 6.19.

### Is there a fix for CVE-2026-89966?

Yes. Fixed in Linux 10f616ef06c5bd2d656a0eebaf73f9b09d150c24, Linux 7b8a8ae4dd176a232e973017d2aa3c536a7275e2. Upgrade Linux to 7b8a8ae4dd176a232e973017d2aa3c536a7275e2 or later.

### How do I check if I'm affected by CVE-2026-89966?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/10f616ef06c5bd2d656a0eebaf73f9b09d150c24>
- other: <https://git.kernel.org/stable/c/7b8a8ae4dd176a232e973017d2aa3c536a7275e2>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-89966>

HTML: <https://flawdb.com/CVE-2026-89966> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-89966>
