CVE-2025-38084 Overview
CVE-2025-38084 is a race condition vulnerability in the Linux kernel's hugetlb memory management subsystem. The flaw resides in the __split_vma() function, which triggers hugetlb page table unsharing through vm_ops->may_split() before the Virtual Memory Area (VMA) lock and rmap locks are taken. This early unsharing creates a window where racing VMA-locked page faults and rmap walks from other processes can cause page tables to be shared again before the split completes. The issue affects the Linux kernel and Debian Linux distributions. A local attacker with low privileges can exploit this race condition to trigger denial of service conditions in the kernel memory subsystem.
Critical Impact
Local attackers can exploit this race condition in mm/hugetlb to cause high-impact availability disruption on affected Linux systems.
Affected Products
- Linux Kernel (multiple versions, regression dating back to the introduction of PMD unsharing logic)
- Debian Linux 11.0
- Linux distributions consuming impacted upstream kernel versions
Discovery Timeline
- 2025-06-28 - CVE-2025-38084 published to NVD
- 2025-12-18 - Last updated in NVD database
Technical Details for CVE-2025-38084
Vulnerability Analysis
The vulnerability exists in the Linux kernel's memory management layer for HugeTLB pages, specifically during the splitting of Virtual Memory Areas. When __split_vma() executes, it invokes hugetlb page table unsharing via the vm_ops->may_split() callback. This call occurs prior to acquiring the VMA lock and reverse mapping (rmap) locks. The premature unsharing leaves a race window in which concurrent operations can re-share Page Middle Directory (PMD) page tables that the kernel expected to be private. Concurrent page faults holding only the VMA lock, along with rmap walks initiated from other processes, can complete during this window. The result is inconsistent page table state during VMA splitting in hugetlb regions. According to the CVE metadata, exploitation requires local access with low privileges and produces a high availability impact, consistent with kernel-level memory corruption or panic scenarios.
Root Cause
The root cause is incorrect lock ordering in the VMA split path for hugetlb-backed mappings. The unsharing of PMDs happens too early — outside the protection of the VMA write lock and the file rmap write lock. The fix, applied upstream, moves the call into __split_vma() at the same location where Transparent Huge Page (THP) splitting occurs, with both the VMA and rmap held write-locked. The patch introduces hugetlb_split() and refactors hugetlb_unshare_pmds() to be callable from two locking contexts. The backporting note records that this issue traces back further than the original commit b30c14cd6102 ("hugetlb: unshare some PMDs when splitting VMAs") suggested, requiring patches across multiple stable kernel branches. The CWE classification is recorded as NVD-CWE-noinfo.
Attack Vector
The attack vector is local. A low-privileged user-space process can trigger the race by issuing memory mapping operations on hugetlb regions — such as mmap(), munmap(), and mprotect() calls that induce VMA splits — while another thread or process performs concurrent operations that walk the rmap or fault pages into the same region. Successful exploitation produces inconsistent shared page table state, which can lead to kernel crashes or memory corruption. No verified public proof-of-concept code is available, and the issue is not listed in the CISA Known Exploited Vulnerabilities catalog. Technical details are documented in the upstream commits and the Chromium Project Zero issue tracker.
No verified exploitation code is publicly available. Refer to the upstream kernel commits for the precise code changes that implement the fix.
Detection Methods for CVE-2025-38084
Indicators of Compromise
- Unexpected kernel oops or panic messages referencing hugetlb, __split_vma, unshare_huge_pmd, or hugetlb_unshare_pmds in dmesg or /var/log/kern.log
- Processes performing rapid, repeated mmap/munmap/mprotect syscalls against hugetlb-backed regions from unprivileged users
- Anomalous segmentation faults or memory errors in applications using HugeTLBfs immediately preceding system instability
Detection Strategies
- Monitor kernel ring buffer logs for hugetlb-related warnings and BUG_ON traces using centralized log aggregation
- Audit syscall telemetry for unusual patterns of VMA-splitting operations against /dev/hugepages or anonymous huge page mappings
- Track kernel version inventory across the fleet and flag hosts running unpatched kernels identified in the upstream stable commits
Monitoring Recommendations
- Forward kernel logs and audit records to a centralized data lake for correlation across hosts
- Alert on repeated kernel panics or soft lockups originating from the memory management subsystem
- Establish a baseline of normal hugetlb usage per workload to detect deviations indicating abuse attempts
How to Mitigate CVE-2025-38084
Immediate Actions Required
- Identify all systems running affected Linux kernel versions, including Debian 11 hosts, and prioritize patch deployment
- Apply the vendor kernel update containing the upstream fix that moves hugetlb PMD unsharing inside the VMA write-locked section
- Restrict local shell and code execution access on multi-tenant systems until patches are applied
- Review applications that rely on HugeTLBfs and confirm they continue to function after patching
Patch Information
The Linux kernel maintainers have published fixes across multiple stable branches. The upstream commits are available at git.kernel.org commit 081056dc, commit 2511ac64, commit 366298f2, commit 8a21d558, commit 9cf5b2a3, commit af6cfcd0, and commit e8847d18. Debian users should apply updates announced in the Debian LTS announcement.
Workarounds
- Limit local user access on shared and multi-tenant Linux hosts to reduce the population of potential attackers
- Disable or restrict access to HugeTLBfs (/dev/hugepages) for untrusted users where the workload does not require it
- Apply Linux capability and seccomp restrictions to confine processes that perform memory mapping syscalls
# Verify current kernel version against fixed releases
uname -r
# Restrict hugetlbfs mount access to a trusted group
mount -o remount,gid=hugetlb_users,mode=0770 /dev/hugepages
# Apply updates on Debian-based systems
sudo apt update && sudo apt install --only-upgrade linux-image-$(uname -r | sed 's/.*-//')
sudo reboot
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

