CVE-2025-37818
CVE-2025-37818 · LoongArch: Return NULL from huge_pte_offset() for invalid PMD
CVSS 5.5 · Medium · EPSS 0.2% · Fix available
Compare with your installed version
Affected products and known fixed versions are public information. Compare them with your installed version.
- linuxNo fix published
- linux Debian 12Update to 6.1.137-1
- linux Debian 13Update to 6.12.27-1
- linux Debian 14Update to 6.12.27-1
- and 2 more
Check the installed version:
dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="linux"'Assess your server’s risks
The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.
Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.
curl -fsSL https://patchfirst.dev/check.sh | shChannels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
- Published
- Updated
Fixes in distributions
- DLA-4193-1 · Debian 11 ·
Stack: system
Affected products and versions
linux
- Versions
- ≥ fa96b57c149061f71a70bd6582d995f6424fbbf4, < 34256805720993e37adf6127371a1265aea8376a: Affected (git)
- ≥ fa96b57c149061f71a70bd6582d995f6424fbbf4, < 2ca9380b12711afe95b3589bd82b59623b3c96b3: Affected (git)
- ≥ fa96b57c149061f71a70bd6582d995f6424fbbf4, < 51424fd171cee6a33f01f7c66b8eb23ac42289d4: Affected (git)
- ≥ fa96b57c149061f71a70bd6582d995f6424fbbf4, < b49f085cd671addbda4802d6b9382513f7dd0f30: Affected (git)
- ≥ fa96b57c149061f71a70bd6582d995f6424fbbf4, < bd51834d1cf65a2c801295d230c220aeebf87a73: Affected (git)
No fix published
linux
- Versions
- 5.19: Affected
- ≥ 0, < 5.19: Not affected (semver)
- ≥ 6.1.136, ≤ 6.1.*: Not affected (semver)
- ≥ 6.6.89, ≤ 6.6.*: Not affected (semver)
- ≥ 6.12.26, ≤ 6.12.*: Not affected (semver)
- ≥ 6.14.5, ≤ 6.14.*: Not affected (semver)
All versions (7)
- ≥ 6.15: Not affected (original_commit_for_fix)
No fix published
linux Debian 12
- Versions
- 6.1.106-1
- 6.1.106-2
- 6.1.106-3
- 6.1.112-1
- 6.1.115-1
- 6.1.119-1
All versions (38)
- 6.1.123-1
- 6.1.124-1
- 6.1.128-1
- 6.1.129-1
- 6.1.133-1
- 6.1.135-1
- 6.1.27-1
- 6.1.37-1
- 6.1.38-1
- 6.1.38-2
- 6.1.38-2~bpo11+1
- 6.1.38-3
- 6.1.38-4
- 6.1.38-4~bpo11+1
- 6.1.52-1
- 6.1.55-1
- 6.1.55-1~bpo11+1
- 6.1.64-1
- 6.1.66-1
- 6.1.67-1
- 6.1.69-1
- 6.1.69-1~bpo11+1
- 6.1.76-1
- 6.1.76-1~bpo11+1
- 6.1.82-1
- 6.1.85-1
- 6.1.90-1
- 6.1.90-1~bpo11+1
- 6.1.94-1
- 6.1.94-1~bpo11+1
- 6.1.98-1
- 6.1.99-1
- Affected ranges
- ECOSYSTEM: < 6.1.137-1
Update to 6.1.137-1
linux Debian 13
- Affected ranges
- ECOSYSTEM: < 6.12.27-1
Update to 6.12.27-1
linux Debian 14
- Affected ranges
- ECOSYSTEM: < 6.12.27-1
Update to 6.12.27-1
linux-gcp-6.14 Ubuntu 24.04 LTS
- Versions
- 6.14.0-1007.7~24.04.1
- Affected ranges
- ECOSYSTEM: < 6.14.0-1011.11~24.04.1
Update to 6.14.0-1011.11~24.04.1
linux-realtime-6.14 Ubuntu Pro Realtime 24.04 LTS
- Versions
- 6.14.0-1003.3~24.04.3
- Affected ranges
- ECOSYSTEM: < 6.14.0-1010.10~24.04.1
Update to 6.14.0-1010.10~24.04.1
Original sources
- 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
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html
- https://nvd.nist.gov/vuln/detail/CVE-2025-37818