CVE-2025-37818
LoongArch: Return NULL from huge_pte_offset() for invalid PMD
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 34256805720993e37adf6127371a1265aea8376a; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 2ca9380b12711afe95b3589bd82b59623b3c96b3; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 51424fd171cee6a33f01f7c66b8eb23ac42289d4; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < b49f085cd671addbda4802d6b9382513f7dd0f30; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < bd51834d1cf65a2c801295d230c220aeebf87a73
- Anyone running Linux 5.19
Vulnerability facts
- Affected
- Linux >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 34256805720993e37adf6127371a1265aea8376a; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 2ca9380b12711afe95b3589bd82b59623b3c96b3; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 51424fd171cee6a33f01f7c66b8eb23ac42289d4; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < b49f085cd671addbda4802d6b9382513f7dd0f30; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < bd51834d1cf65a2c801295d230c220aeebf87a73; Linux 5.19
- Fixed in
- Linux 34256805720993e37adf6127371a1265aea8376a, Linux 2ca9380b12711afe95b3589bd82b59623b3c96b3, Linux 51424fd171cee6a33f01f7c66b8eb23ac42289d4
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.5 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- EPSS
- 0.28% chance of exploitation in 30 days (percentile 13, 2026-11-26)
- CWE
- CWE-476
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 34256805720993e37adf6127371a1265aea8376a; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 2ca9380b12711afe95b3589bd82b59623b3c96b3; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 51424fd171cee6a33f01f7c66b8eb23ac42289d4; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < b49f085cd671addbda4802d6b9382513f7dd0f30; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < bd51834d1cf65a2c801295d230c220aeebf87a73 | — | cvelist |
| Linux | 5.19 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-37818. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-37818.md Affected: Linux >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 34256805720993e37adf6127371a1265aea8376a; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 2ca9380b12711afe95b3589bd82b59623b3c96b3; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 51424fd171cee6a33f01f7c66b8eb23ac42289d4; >= fa96b57c149061f71a70bd6… Fixed in: Linux 34256805720993e37adf6127371a1265aea8376a, Linux 2ca9380b12711afe95b3589bd82b59623b3c96b3, Linux 51424fd171cee6a33f01f7c66b8eb23ac42289d4 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/34256805720993e37adf6127371a1265aea8376a
- https://git.kernel.org/stable/c/2ca9380b12711afe95b3589bd82b59623b3c96b3
- https://git.kernel.org/stable/c/51424fd171cee6a33f01f7c66b8eb23ac42289d4
- https://git.kernel.org/stable/c/b49f085cd671addbda4802d6b9382513f7dd0f30
- https://git.kernel.org/stable/c/bd51834d1cf65a2c801295d230c220aeebf87a73
FAQ
Is CVE-2025-37818 being exploited?
There is no confirmed exploitation: CVE-2025-37818 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-37818?
Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-37818?
Linux >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 34256805720993e37adf6127371a1265aea8376a; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 2ca9380b12711afe95b3589bd82b59623b3c96b3; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < 51424fd171cee6a33f01f7c66b8eb23ac42289d4; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < b49f085cd671addbda4802d6b9382513f7dd0f30; >= fa96b57c149061f71a70bd6582d995f6424fbbf4, < bd51834d1cf65a2c801295d230c220aeebf87a73; Linux 5.19.
Is there a fix for CVE-2025-37818?
Yes. Fixed in Linux 34256805720993e37adf6127371a1265aea8376a, Linux 2ca9380b12711afe95b3589bd82b59623b3c96b3, Linux 51424fd171cee6a33f01f7c66b8eb23ac42289d4. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2025-37818?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.