CVE-2025-38447 mm/rmap: fix potential out-of-bounds page table access during batched unmap

High 7.8 Published Updated

A local attacker can trigger an out-of-bounds page table access in the Linux kernel memory management subsystem, potentially causing a crash or privilege escalation.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-38447?

CVE-2025-38447 is a high-severity memory corruption vulnerability in Linux kernel, published on 25 Jul 2025. 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/rmap: fix potential out-of-bounds page table access during batched unmap

As pointed out by David[1], the batched unmap logic in try_to_unmap_one() may read past the end of a PTE table when a large folio's PTE mappings are not fully contained within a single page table.

While this scenario might be rare, an issue triggerable from userspace must be fixed regardless of its likelihood. This patch fixes the out-of-bounds access by refactoring the logic into a new helper, folio_unmap_pte_batch().

The new helper correctly calculates the safe batch size by capping the scan at both the VMA and PMD boundaries. To simplify the code, it also supports partial batching (i.e., any number of pages from 1 up to the calculated safe maximum), as there is no strong reason to special-case for fully mapped folios.

Weakness: CWE-125

Which versions are affected by CVE-2025-38447?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-38447?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-38447 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-38447, GHSA-crvf-pv9v-3xvj, UBUNTU-CVE-2025-38447.

Is CVE-2025-38447 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free