CVE-2026-31589 mm: call ->free_folio() directly in folio_unmap_invalidate()
A use-after-free vulnerability in the Linux kernel memory management subsystem allows attackers to potentially execute arbitrary code or escalate privileges.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-31589?
CVE-2026-31589 is a critical use after free vulnerability in Linux kernel, published on 24 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
mm: call ->free_folio() directly in folio_unmap_invalidate()
We can only call filemap_free_folio() if we have a reference to (or hold a lock on) the mapping. Otherwise, we've already removed the folio from the mapping so it no longer pins the mapping and the mapping can be removed, causing a use-after-free when accessing mapping->a_ops.
Follow the same pattern as __remove_mapping() and load the free_folio function pointer before dropping the lock on the mapping. That lets us make filemap_free_folio() static as this was the only caller outside filemap.c.
Weakness: CWE-416
Which versions are affected by CVE-2026-31589?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2026-31589?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2026-31589 being exploited?
There is no known exploitation of CVE-2026-31589 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-83675, BELL-CVE-2026-31589, DEBIAN-CVE-2026-31589, GHSA-mg7h-q7hw-m596, UBUNTU-CVE-2026-31589.