CVE-2025-37818 json
LoongArch: Return NULL from huge_pte_offset() for invalid PMD
published 2025-05-08 18 mo ago modified 2026-06-17 4 mo ago also EUVD-2025-13988
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 8%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: Return NULL from huge_pte_offset() for invalid PMD
LoongArch's huge_pte_offset() currently returns a pointer to a PMD slot even if the underlying entry points to invalid_pte_table (indicating no mapping). Callers like smaps_hugetlb_range() fetch this invalid entry value (the address of invalid_pte_table) via this pointer.
The generic is_swap_pte() check then incorrectly identifies this address as a swap entry on LoongArch, because it satisfies the "!pte_present() && !pte_none()" conditions. This misinterpretation, combined with a coincidental match by is_migration_entry() on the address bits, leads to kernel crashes in pfn_swap_entry_to_page().
Fix this at the architecture level by modifying huge_pte_offset() to check the PMD entry's content using pmd_none() before returning. If the entry is invalid (i.e., it points to invalid_pte_table), return NULL instead of the pointer to the slot.
Patch / fix
- Linux Linux 6.1.136, 6.6.89, 6.12.26, 6.14.5, 6.15
- linux Debian 12 6.1.137-1
- linux Debian 14, Debian 13 6.12.27-1
debian advisories DEBIAN-CVE-2025-37818
- linux-gcp-6.14 Ubuntu 24.04 LTS 6.14.0-1011.11~24.04.1
- linux-realtime-6.14 Ubuntu Pro Realtime 24.04 LTS 6.14.0-1010.10~24.04.1
ubuntu advisories UBUNTU-CVE-2025-37818
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- git.kernel.org/stable/c/34256805720993e37adf6127371a1265aea8376a commit
- git.kernel.org/stable/c/2ca9380b12711afe95b3589bd82b59623b3c96b3 commit
- git.kernel.org/stable/c/51424fd171cee6a33f01f7c66b8eb23ac42289d4 commit
- git.kernel.org/stable/c/b49f085cd671addbda4802d6b9382513f7dd0f30 commit
- git.kernel.org/stable/c/bd51834d1cf65a2c801295d230c220aeebf87a73 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-37818 updated cvss 5.5
kernel: LoongArch: Return NULL from huge_pte_offset() for invalid PMD
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.19% chance of exploitation in the next 30 days, higher than 8% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-476 NULL Pointer Dereference
- Technology feeds
References
-
git.kernel.org
/stable/c/34256805720993e37adf6127371a1265aea8376a
patch
-
git.kernel.org
/stable/c/2ca9380b12711afe95b3589bd82b59623b3c96b3
patch
-
git.kernel.org
/stable/c/51424fd171cee6a33f01f7c66b8eb23ac42289d4
patch
-
git.kernel.org
/stable/c/b49f085cd671addbda4802d6b9382513f7dd0f30
patch
-
git.kernel.org
/stable/c/bd51834d1cf65a2c801295d230c220aeebf87a73
patch
-
lists.debian.org
/debian-lts-announce/2025/05/msg00045.html
mailing-list, third-party-advisory
Sources
- CVE List CVE-2025-37818
- NVD CVE-2025-37818
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.