CVE-2025-39899

Source
https://cve.org/CVERecord?id=CVE-2025-39899
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39899.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-39899
Downstream
Related
Published
2025-10-01T07:42:47.100Z
Modified
2026-03-12T02:17:18.632667Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
mm/userfaultfd: fix kmap_local LIFO ordering for CONFIG_HIGHPTE
Details

In the Linux kernel, the following vulnerability has been resolved:

mm/userfaultfd: fix kmaplocal LIFO ordering for CONFIGHIGHPTE

With CONFIGHIGHPTE on 32-bit ARM, movepagespte() maps PTE pages using kmaplocal_page(), which requires unmapping in Last-In-First-Out order.

The current code maps dstpte first, then srcpte, but unmaps them in the same order (dstpte, srcpte), violating the LIFO requirement. This causes the warning in kunmaplocalindexed():

WARNING: CPU: 0 PID: 604 at mm/highmem.c:622 kunmaplocalindexed+0x178/0x17c addr != __fixtovirt(FIXKMAPBEGIN + 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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39899.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
adef440691bab824e39c1b17382322d195e1fab0
Fixed
b051f707018967ea8f697d790a1ed8c443f63812
Fixed
bd1ee62759d0bd4d6b909731c076c230ac89d61e
Fixed
9614d8bee66387501f48718fa306e17f2aa3f2f3

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39899.json"