CVE-2025-38195
Medium · 5.5CVSS
5.5
EPSS
0.2%
Published
Jul 4, 2025
CISA due date
—
Cloudanix analysis
A bug in the Linux kernel can make the whole computer suddenly crash when certain memory-handling operations run, forcing restarts and interrupting work until the operating system is updated.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- OS kernel
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
NULL pointer dereference in huge_pte_offset() on LoongArch when a PMD entry is absent during hugetlb page table walks triggered by madvise and get_user_pages operations, resulting in a kernel paging fault at address 0x0 and immediate panic.
Why it matters to the business
Unprivileged local processes can trigger kernel crashes that reboot or halt affected Linux systems, causing unplanned downtime, loss of running workloads, and potential data corruption in memory-intensive applications; the issue affects widely deployed kernel versions until 6.6.95.
How an attack unfolds
An attacker with local access maps a huge-page-backed region, issues an madvise call that forces page-fault handling through hugetlb_follow_page_mask, and reaches the unchecked NULL PMD path in huge_pte_offset, producing a deterministic kernel panic; no remote vector or privilege escalation is required.
How to fix it
Upgrade the Linux kernel to version 6.6.95 or later; for Chainguard images update tigera-operator-fips-1.29 to 1.29.8-r22; apply the commit b427d98d55217b53c88643579fbbd8a4c351a105 from stable trees; reboot after installation and verify the new kernel is running.
How to confirm the fix worked
Confirm the running kernel reports version 6.6.95 or newer; attempt to reproduce the original madvise/hugetlb sequence in a test environment and verify absence of the NULL dereference panic; inspect dmesg for the fixed call trace pattern.
Typical attack path
- Obtain local unprivileged shell on target system
- Create or attach to a memory region backed by huge pages
- Invoke madvise with behavior flags that walk page tables via faultin_page_range
- Trigger NULL PMD dereference inside huge_pte_offset leading to panic
How to detect it
Search kernel logs and crash dumps for the exact call trace starting with huge_pte_offset+0x3c/0x58 followed by hugetlb_follow_page_mask, __get_user_pages, faultin_page_range, and madvise_vma_behavior; correlate with sys_madvise system-call entries in audit or strace output around the time of the panic.
- huge_pte_offset+0x3c/0x58
- hugetlb_follow_page_mask+0x74/0x438
- CPU .* Unable to handle kernel paging request at virtual address 0x0
What your security team should do
- Prioritize kernel updates to 6.6.95 on all LoongArch systems within the next maintenance window
- Add kernel version checks to configuration management and image build pipelines
- Monitor for oops/panic reports containing huge_pte_offset and hugetlb_follow_page_mask until patches are deployed
The record
In the Linux kernel, the following vulnerability has been resolved: LoongArch: Fix panic caused by NULL-PMD in huge_pte_offset() ERROR INFO: CPU 25 Unable to handle kernel paging request at virtual address 0x0 ... Call Trace: [<900000000023c30c>] huge_pte_offset+0x3c/0x58 [<900000000057fd4c>] hugetlb_follow_page_mask+0x74/0x438 [<900000000051fee8>] __get_user_pages+0xe0/0x4c8 [<9000000000522414>] faultin_page_range+0x84/0x380 [<9000000000564e8c>] madvise_vma_behavior+0x534/0xa48 [<900000000056689c>] do_madvise+0x1bc/0x3e8 [<9000000000566df4>] sys_madvise+0x24/0x38 [<90000000015b9e88>] do_syscall+0x78/0x98 [<9000000000221f18>] handle_syscall+0xb8/0x158 In some cases, pmd may be NULL and rely on NULL as the return value for processing, so it is necessary to determine this situation here.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:12 | linux | 0 | No fix |
| Debian:13 | linux | 0 | No fix |
| Linux | Kernel | 0 | 6.6.95 |
| Mageia:9 | kernel | 0 | 6.6.101-1.mga9 |
| Mageia:9 | kernel-linus | 0 | 6.6.101-1.mga9 |
| Mageia:9 | kmod-virtualbox | 0 | 7.1.10-7.mga9 |
| Mageia:9 | kmod-xtables-addons | 0 | 3.24-83.mga9 |
| Mageia:9 | wireless-regdb | 0 | 20250710-1.mga9 |
Related vulnerabilities
- CVE-2025-39885 In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix recursive… Also affects linux
- CVE-2025-39883 In the Linux kernel, the following vulnerability has been resolved: mm/memory-failure… Also affects linux
- CVE-2025-39886 In the Linux kernel, the following vulnerability has been resolved: bpf: Tell memcg to… Also affects linux
- CVE-2025-39876 In the Linux kernel, the following vulnerability has been resolved: net: fec: Fix… Also affects linux
- CVE-2025-39880 In the Linux kernel, the following vulnerability has been resolved: libceph: fix invalid… Also affects linux
- CVE-2025-39881 In the Linux kernel, the following vulnerability has been resolved: kernfs: Fix UAF in… Also affects linux
- CVE-2025-39877 In the Linux kernel, the following vulnerability has been resolved: mm/damon/sysfs: fix… Also affects linux
- CVE-2025-39871 In the Linux kernel, the following vulnerability has been resolved: dmaengine: idxd… Also affects linux