CVE-2025-37818
LoongArch: Return NULL from huge_pte_offset() for invalid PMD
Check your servers for CVE-2025-37818
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-37818 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Exploitation
EPSS 0.19%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 9.53% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from fa96b57c149061f71a70bd6582d995f6424fbbf4, before 34256805720993e37adf6127371a1265aea8376a affected from fa96b57c149061f71a70bd6582d995f6424fbbf4, before 2ca9380b12711afe95b3589bd82b59623b3c96b3 affected from fa96b57c149061f71a70bd6582d995f6424fbbf4, before 51424fd171cee6a33f01f7c66b8eb23ac42289d4 affected from fa96b57c149061f71a70bd6582d995f6424fbbf4, before b49f085cd671addbda4802d6b9382513f7dd0f30 affected from fa96b57c149061f71a70bd6582d995f6424fbbf4, before bd51834d1cf65a2c801295d230c220aeebf87a73
Other versions: unaffected
|
| Linux |
affected 5.19 unaffected before 5.19 unaffected from 6.1.136 up to and including 6.1.* unaffected from 6.6.89 up to and including 6.6.* unaffected from 6.12.26 up to and including 6.12.* unaffected from 6.14.5 up to and including 6.14.* unaffected 6.15 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-37818 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-37818
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-37818
trivy image --scanners vuln IMAGE | grep CVE-2025-37818
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/34256805720993e37adf6127371a1265aea8376a git.kernel.org
- https://git.kernel.org/stable/c/2ca9380b12711afe95b3589bd82b59623b3c96b3 git.kernel.org
- https://git.kernel.org/stable/c/51424fd171cee6a33f01f7c66b8eb23ac42289d4 git.kernel.org
- https://git.kernel.org/stable/c/b49f085cd671addbda4802d6b9382513f7dd0f30 git.kernel.org
- https://git.kernel.org/stable/c/bd51834d1cf65a2c801295d230c220aeebf87a73 git.kernel.org
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html lists.debian.org
Source: the record CVE-2025-37818 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse