CVE-2025-38085 mm/hugetlb: fix huge_pmd_unshare() vs GUP-fast race

High 7.8 Published Updated

A race condition in the Linux kernel's hugetlb subsystem allows concurrent GUP-fast operations to access incorrect page tables, potentially causing unexpected behavior.

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-38085?

CVE-2025-38085 is a high-severity vulnerability in Debian Debian Linux, published on 28 Jun 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/hugetlb: fix huge_pmd_unshare() vs GUP-fast race

huge_pmd_unshare() drops a reference on a page table that may have previously been shared across processes, potentially turning it into a normal page table used in another process in which unrelated VMAs can afterwards be installed.

If this happens in the middle of a concurrent gup_fast(), gup_fast() could end up walking the page tables of another process. While I don't see any way in which that immediately leads to kernel memory corruption, it is really weird and unexpected.

Fix it with an explicit broadcast IPI through tlb_remove_table_sync_one(), just like we do in khugepaged when removing page tables for a THP collapse.

Weakness: CWE-362

Which versions are affected by CVE-2025-38085?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2025-38085?

Apply the vendor's patch.

Is CVE-2025-38085 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as AZL-64380, BELL-CVE-2025-38085, DEBIAN-CVE-2025-38085, GHSA-5q6f-wm2q-mpgg, ROOT-OS-DEBIAN-11-CVE-2025-38085, ROOT-OS-DEBIAN-12-CVE-2025-38085 and 3 more.

Is CVE-2025-38085 in your software?

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

Check your SBOMs for free