# CVE-2026-72212: mm/memory_hotplug: fix incorrect altmap passing in error path

> A bug in the Linux kernel memory hotplug error path causes memory corruption and potential code execution when memmap_on_memory is enabled.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Aug 2026
- **Updated:** 17 Aug 2026
- **Also known as:** BELL-CVE-2026-72212, DEBIAN-CVE-2026-72212, GHSA-w9xv-r954-cxrq, UBUNTU-CVE-2026-72212

## What is CVE-2026-72212?

CVE-2026-72212 is a memory corruption vulnerability in Linux, published on 15 Aug 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

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

mm/memory_hotplug: fix incorrect altmap passing in error path

In create_altmaps_and_memory_blocks(), when arch_add_memory() succeeds
with memmap_on_memory enabled, the vmemmap pages are allocated from
params.altmap.  If create_memory_block_devices() subsequently fails, the
error path calls arch_remove_memory() with a NULL altmap instead of
params.altmap.

This is a bug that could lead to memory corruption.  Since altmap is NULL,
vmemmap_free() falls back to freeing the vmemmap pages into the system
buddy allocator via free_pages() instead of the altmap. 
arch_remove_memory() then immediately destroys the physical linear mapping
for this memory.  This injects unowned pages into the buddy allocator,
causing machine checks or memory corruption if the system later attempts
to allocate and use those freed pages.

Fix this by passing params.altmap to arch_remove_memory() in the error
path.

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


## How do I fix CVE-2026-72212?

Apply the vendor's patch.

## Is CVE-2026-72212 being exploited?

There is no known exploitation of CVE-2026-72212 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-72212 and fix it if it is affected.

What it is: CVE-2026-72212 is a memory corruption vulnerability in Linux, published on 15 Aug 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-72212 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-72212/ (Markdown: https://insights.sbomify.com/CVE-2026-72212/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-72212
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-72212
- OSV: https://osv.dev/vulnerability/CVE-2026-72212

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-72212/
Summaries are generated and may contain mistakes; the official description above is the record.
