CVE-2025-40184

Source
https://cve.org/CVERecord?id=CVE-2025-40184
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40184.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40184
Downstream
Published
2025-11-12T21:56:28.044Z
Modified
2025-12-02T09:22:53.314198Z
Summary
KVM: arm64: Fix debug checking for np-guests using huge mappings
Details

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 CONFIGNVHEEL2DEBUG then the debug checking in asserthostsharedguest() fails on the launch of an np-guest. This WARN_ON() causes a panic and generates the stack below.

In _pkvmhostrelaxperms_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 _pkvmhostmkyoungguest().

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.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] showstack+0x18/0x24 (C) [ 1406.523753] dumpstacklvl+0xd4/0x108 [ 1406.523899] dumpstack+0x18/0x24 [ 1406.524040] panic+0x3d8/0x448 [ 1406.524184] nvhehyppanichandler+0x10c/0x23c [ 1406.524325] kvmhandleguestabort+0x68c/0x109c [ 1406.524500] handleexit+0x60/0x17c [ 1406.524630] kvmarchvcpuioctlrun+0x2e0/0x8c0 [ 1406.524794] kvmvcpuioctl+0x1a8/0x9cc [ 1406.524919] _arm64sysioctl+0xac/0x104 [ 1406.525067] invokesyscall+0x48/0x10c [ 1406.525189] el0svccommon.constprop.0+0x40/0xe0 [ 1406.525322] doel0svc+0x1c/0x28 [ 1406.525441] el0svc+0x38/0x120 [ 1406.525588] el0t64synchandler+0x10c/0x138 [ 1406.525750] el0t64_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 ]

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40184.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f28f1d02f4eaac05c2ad6bf7264a8696dc21d011
Fixed
4f7af3d8a1177c807d1f2563c7c171700b020656
Fixed
2ba972bf71cb71d2127ec6c3db1ceb6dd0c73173

Affected versions

v6.*
v6.15
v6.15-rc5
v6.15-rc6
v6.15-rc7
v6.16
v6.16-rc1
v6.16-rc2
v6.16-rc3
v6.16-rc4
v6.16-rc5
v6.16-rc6
v6.16-rc7
v6.17
v6.17-rc1
v6.17-rc2
v6.17-rc3
v6.17-rc4
v6.17-rc5
v6.17-rc6
v6.17-rc7
v6.17.1
v6.17.2
v6.17.3

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40184.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.16.0
Fixed
6.17.4

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40184.json"