CVE-2025-39899: mm/userfaultfd: fix kmap_local LIFO ordering for CONFIG_HIGHPTE
In the Linux kernel, the following vulnerability has been resolved:
mm/userfaultfd: fix kmap_local LIFO ordering for CONFIG_HIGHPTE
With CONFIG_HIGHPTE on 32-bit ARM, move_pages_pte() maps PTE pages using
kmap_local_page(), which requires unmapping in Last-In-First-Out order.
The current code maps dst_pte first, then src_pte, but unmaps them in the
same order (dst_pte, src_pte), violating the LIFO requirement. This
causes the warning in kunmap_local_indexed():
WARNING: CPU: 0 PID: 604 at mm/highmem.c:622 kunmap_local_indexed+0x178/0x17c
addr \!= __fix_to_virt(FIX_KMAP_BEGIN + idx)
Fix this by reversing the unmap order to respect LIFO ordering.
This issue follows the same pattern as similar fixes:
- commit eca6828403b8 ("crypto: skcipher - fix mismatch between mapping and unmapping order")
- commit 8cf57c6df818 ("nilfs2: eliminate staggered calls to kunmap in nilfs_rename")
Both of which addressed the same fundamental requirement that kmap_local
operations must follow LIFO ordering.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel availability bug affecting a narrow configuration: 32-bit ARM kernels using CONFIG_HIGHPTE. A local low-privileged user may be able to trigger a kernel warning or failure path. The published scoring shows no confidentiality or integrity impact, but high availability impact.
Executive priority
Treat as a targeted availability issue, not a broad enterprise emergency. Patch affected ARM Linux systems through normal kernel maintenance, with faster handling where local untrusted access exists or uptime requirements are strict.
Technical view
In move_pages_pte(), dst_pte and src_pte are mapped with kmap_local_page() but unmapped in FIFO order instead of required LIFO order. On 32-bit ARM with CONFIG_HIGHPTE, this violates kmap_local semantics and can trigger kunmap_local_indexed() warnings, with availability impact.
Likely exposure
Exposure appears limited to affected Linux kernels on 32-bit ARM systems with CONFIG_HIGHPTE enabled. The CVSS vector requires local access with low privileges and no user interaction. Non-ARM systems or kernels without CONFIG_HIGHPTE are not indicated as affected by the provided sources.
Exploitation context
The source bundle does not show CISA KEV listing or any cited evidence of active exploitation. The CVSS vector indicates local exploitation requiring low privileges. No exploit details or weaponized public activity are provided in the supplied sources.
Researcher notes
The record identifies the flaw as an ordering bug in kmap_local unmapping within mm/userfaultfd. The affected-version data is sparse and commit-oriented, so distribution-specific exposure should be confirmed through vendor advisories or kernel backport metadata.
Mitigation direction
Check distro or vendor kernel advisories for CVE-2025-39899 fixed packages.
Update to a kernel containing the cited stable fixes.
Prioritize affected 32-bit ARM systems with local untrusted users.
Reboot into the fixed kernel after patching.
If no package exists, follow vendor guidance for backport availability.
Validation and detection
Inventory Linux kernel versions on 32-bit ARM systems.
Check whether CONFIG_HIGHPTE is enabled in deployed kernels.
Confirm the relevant stable commits are present or backported.
Verify systems rebooted into the patched kernel.
Review kernel logs for the cited kunmap_local_indexed warning.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-39899 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.