# CVE-2025-40184: KVM: arm64: Fix debug checking for np-guests using huge mappings

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.26% (percentile 11, 2026-11-26)
- **Published:** 2025-11-12T21:56:28.044Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= f28f1d02f4eaac05c2ad6bf7264a8696dc21d011, \< 4f7af3d8a1177c807d1f2563c7c171700b020656; \>= f28f1d02f4eaac05c2ad6bf7264a8696dc21d011, \< 2ba972bf71cb71d2127ec6c3db1ceb6dd0c73173
- Anyone running Linux 6.16

## Description

In the Linux kernel, the following vulnerability has been resolved:

KVM: arm64: Fix debug checking for np-guests using huge mappings

When running with transparent huge pages and CONFIG\_NVHE\_EL2\_DEBUG then
the debug checking in assert\_host\_shared\_guest() fails on the launch of an
np-guest. This WARN\_ON() causes a panic and generates the stack below.

In \_\_pkvm\_host\_relax\_perms\_guest() the debug checking assumes the mapping
is a single page but it may be a block map. Update the checking so that
the size is not checked and just assumes the correct size.

While we're here make the same fix in \_\_pkvm\_host\_mkyoung\_guest().

  Info: \# lkvm run -k /share/arch/arm64/boot/Image -m 704 -c 8 --name guest-128
  Info: Removed ghost socket file "/.lkvm//guest-128.sock".
\[ 1406.521757\] kvm \[141\]: nVHE hyp BUG at: arch/arm64/kvm/hyp/nvhe/mem\_protect.c:1088!
\[ 1406.521804\] kvm \[141\]: nVHE call trace:
\[ 1406.521828\] kvm \[141\]:  \[\<ffff8000811676b4\>\] \_\_kvm\_nvhe\_hyp\_panic+0xb4/0xe8
\[ 1406.521946\] kvm \[141\]:  \[\<ffff80008116d12c\>\] \_\_kvm\_nvhe\_assert\_host\_shared\_guest+0xb0/0x10c
\[ 1406.522049\] kvm \[141\]:  \[\<ffff80008116f068\>\] \_\_kvm\_nvhe\_\_\_pkvm\_host\_relax\_perms\_guest+0x48/0x104
\[ 1406.522157\] kvm \[141\]:  \[\<ffff800081169df8\>\] \_\_kvm\_nvhe\_handle\_\_\_pkvm\_host\_relax\_perms\_guest+0x64/0x7c
\[ 1406.522250\] kvm \[141\]:  \[\<ffff800081169f0c\>\] \_\_kvm\_nvhe\_handle\_trap+0x8c/0x1a8
\[ 1406.522333\] kvm \[141\]:  \[\<ffff8000811680fc\>\] \_\_kvm\_nvhe\_\_\_skip\_pauth\_save+0x4/0x4
\[ 1406.522454\] kvm \[141\]: ---\[ end nVHE call trace \]---
\[ 1406.522477\] kvm \[141\]: Hyp Offset: 0xfffece8013600000
\[ 1406.522554\] Kernel panic - not syncing: HYP panic:
\[ 1406.522554\] PS:834003c9 PC:0000b1806db6d170 ESR:00000000f2000800
\[ 1406.522554\] FAR:ffff8000804be420 HPFAR:0000000000804be0 PAR:0000000000000000
\[ 1406.522554\] VCPU:0000000000000000
\[ 1406.523337\] CPU: 3 UID: 0 PID: 141 Comm: kvm-vcpu-0 Not tainted 6.16.0-rc7 \#97 PREEMPT
\[ 1406.523485\] Hardware name: FVP Base RevC (DT)
\[ 1406.523566\] Call trace:
\[ 1406.523629\]  show\_stack+0x18/0x24 (C)
\[ 1406.523753\]  dump\_stack\_lvl+0xd4/0x108
\[ 1406.523899\]  dump\_stack+0x18/0x24
\[ 1406.524040\]  panic+0x3d8/0x448
\[ 1406.524184\]  nvhe\_hyp\_panic\_handler+0x10c/0x23c
\[ 1406.524325\]  kvm\_handle\_guest\_abort+0x68c/0x109c
\[ 1406.524500\]  handle\_exit+0x60/0x17c
\[ 1406.524630\]  kvm\_arch\_vcpu\_ioctl\_run+0x2e0/0x8c0
\[ 1406.524794\]  kvm\_vcpu\_ioctl+0x1a8/0x9cc
\[ 1406.524919\]  \_\_arm64\_sys\_ioctl+0xac/0x104
\[ 1406.525067\]  invoke\_syscall+0x48/0x10c
\[ 1406.525189\]  el0\_svc\_common.constprop.0+0x40/0xe0
\[ 1406.525322\]  do\_el0\_svc+0x1c/0x28
\[ 1406.525441\]  el0\_svc+0x38/0x120
\[ 1406.525588\]  el0t\_64\_sync\_handler+0x10c/0x138
\[ 1406.525750\]  el0t\_64\_sync+0x1ac/0x1b0
\[ 1406.525876\] SMP: stopping secondary CPUs
\[ 1406.525965\] Kernel Offset: disabled
\[ 1406.526032\] CPU features: 0x0000,00000080,8e134ca1,9446773f
\[ 1406.526130\] Memory Limit: none
\[ 1406.959099\] ---\[ end Kernel panic - not syncing: HYP panic:
\[ 1406.959099\] PS:834003c9 PC:0000b1806db6d170 ESR:00000000f2000800
\[ 1406.959099\] FAR:ffff8000804be420 HPFAR:0000000000804be0 PAR:0000000000000000
\[ 1406.959099\] VCPU:0000000000000000 \]

## Affected and fixed versions

- Linux: \>= f28f1d02f4eaac05c2ad6bf7264a8696dc21d011, \< 4f7af3d8a1177c807d1f2563c7c171700b020656; \>= f28f1d02f4eaac05c2ad6bf7264a8696dc21d011, \< 2ba972bf71cb71d2127ec6c3db1ceb6dd0c73173 (cvelist)
- Linux: 6.16 (cvelist)

## Mitigation

- Upgrade Linux to 2ba972bf71cb71d2127ec6c3db1ceb6dd0c73173 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-40184. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40184.md
Affected: Linux >= f28f1d02f4eaac05c2ad6bf7264a8696dc21d011, < 4f7af3d8a1177c807d1f2563c7c171700b020656; >= f28f1d02f4eaac05c2ad6bf7264a8696dc21d011, < 2ba972bf71cb71d2127ec6c3db1ceb6dd0c73173; Linux 6.16
Fixed in: Linux 4f7af3d8a1177c807d1f2563c7c171700b020656, Linux 2ba972bf71cb71d2127ec6c3db1ceb6dd0c73173

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.
```

## FAQ

### Is CVE-2025-40184 being exploited?

There is no confirmed exploitation: CVE-2025-40184 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.26% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-40184?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2025-40184?

Linux \>= f28f1d02f4eaac05c2ad6bf7264a8696dc21d011, \< 4f7af3d8a1177c807d1f2563c7c171700b020656; \>= f28f1d02f4eaac05c2ad6bf7264a8696dc21d011, \< 2ba972bf71cb71d2127ec6c3db1ceb6dd0c73173; Linux 6.16.

### Is there a fix for CVE-2025-40184?

Yes. Fixed in Linux 4f7af3d8a1177c807d1f2563c7c171700b020656, Linux 2ba972bf71cb71d2127ec6c3db1ceb6dd0c73173. Upgrade Linux to 2ba972bf71cb71d2127ec6c3db1ceb6dd0c73173 or later.

### How do I check if I'm affected by CVE-2025-40184?

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.

## References

- other: <https://git.kernel.org/stable/c/4f7af3d8a1177c807d1f2563c7c171700b020656>
- other: <https://git.kernel.org/stable/c/2ba972bf71cb71d2127ec6c3db1ceb6dd0c73173>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-40184>

HTML: <https://flawdb.com/CVE-2025-40184> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-40184>
