{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-37818","id":"CVE-2025-37818","title":"LoongArch: Return NULL from huge_pte_offset() for invalid PMD","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: Return NULL from huge_pte_offset() for invalid PMD\n\nLoongArch's huge_pte_offset() currently returns a pointer to a PMD slot\neven if the underlying entry points to invalid_pte_table (indicating no\nmapping). Callers like smaps_hugetlb_range() fetch this invalid entry\nvalue (the address of invalid_pte_table) via this poin","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: Return NULL from huge_pte_offset() for invalid PMD\n\nLoongArch's huge_pte_offset() currently returns a pointer to a PMD slot\neven if the underlying entry points to invalid_pte_table (indicating no\nmapping). Callers like smaps_hugetlb_range() fetch this invalid entry\nvalue (the address of invalid_pte_table) via this pointer.\n\nThe generic is_swap_pte() check then incorrectly identifies this address\nas a swap entry on LoongArch, because it satisfies the \"!pte_present()\n&& !pte_none()\" conditions. This misinterpretation, combined with a\ncoincidental match by is_migration_entry() on the address bits, leads to\nkernel crashes in pfn_swap_entry_to_page().\n\nFix this at the architecture level by modifying huge_pte_offset() to\ncheck the PMD entry's content using pmd_none() before returning. If the\nentry is invalid (i.e., it points to invalid_pte_table), return NULL\ninstead of the pointer to the slot.","published":"2025-05-08T06:26:13.322Z","updated":"2026-10-28T02:30:26.477466229Z","reserved":"2025-04-16T04:51:23.947Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fa96b57c149061f71a70bd6582d995f6424fbbf4","lessThan":"34256805720993e37adf6127371a1265aea8376a","status":"affected","versionType":"git"},{"version":"fa96b57c149061f71a70bd6582d995f6424fbbf4","lessThan":"2ca9380b12711afe95b3589bd82b59623b3c96b3","status":"affected","versionType":"git"},{"version":"fa96b57c149061f71a70bd6582d995f6424fbbf4","lessThan":"51424fd171cee6a33f01f7c66b8eb23ac42289d4","status":"affected","versionType":"git"},{"version":"fa96b57c149061f71a70bd6582d995f6424fbbf4","lessThan":"b49f085cd671addbda4802d6b9382513f7dd0f30","status":"affected","versionType":"git"},{"version":"fa96b57c149061f71a70bd6582d995f6424fbbf4","lessThan":"bd51834d1cf65a2c801295d230c220aeebf87a73","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","lessThan":"5.19","status":"unaffected","versionType":"semver"},{"version":"6.1.136","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.89","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.26","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.14.5","lessThanOrEqual":"6.14.*","status":"unaffected","versionType":"semver"},{"version":"6.15","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-476"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/34256805720993e37adf6127371a1265aea8376a","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/2ca9380b12711afe95b3589bd82b59623b3c96b3","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/51424fd171cee6a33f01f7c66b8eb23ac42289d4","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/b49f085cd671addbda4802d6b9382513f7dd0f30","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/bd51834d1cf65a2c801295d230c220aeebf87a73","tags":["Patch","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html","tags":["Mailing List","Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37818.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-37818","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00189,"epssPercentile":0.08594,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-37818","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-37818","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-37818","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-37818","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}