Skip to contentSkip to conversation

CVE-2026-98440: KVM: arm64: nv: Delay freeing of shadow S2 structures until VM destruction

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 18

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

KVM: arm64: nv: Delay freeing of shadow S2 structures until VM destruction

We free the shadow S2 structures from kvm_arch_flush_shadow_all(), which is a Bad Idea(tm). Freeing the page tables is fair game (this is what this callback is for), but freeing the container that could still be referenced by another part of the system is not great.

Instead, grow separate destructors that gets called when we tear the VM down for good. From there, we can nuke both the individual MMUs as well as the global array that points to them, safe in the knowledge that the vcpus themselves have been destroyed already.

The Linux kernel CVE team has assigned CVE-2026-98440 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.11 with commit 4f128f8e1aaac189f83d0f828bcdb2986d8d2e51 and fixed in 6.12.113 with commit 876049f026b4dfaca0cc78ec81be0e639ca8525d
	Issue introduced in 6.11 with commit 4f128f8e1aaac189f83d0f828bcdb2986d8d2e51 and fixed in 6.18.56 with commit 22e82acec93a681071ed36f70eabe2d0c4e0bebd
	Issue introduced in 6.11 with commit 4f128f8e1aaac189f83d0f828bcdb2986d8d2e51 and fixed in 7.2.9 with commit 5bf1c9175e657b3c2dc1cf77403031ac7aadcf66
	Issue introduced in 6.11 with commit 4f128f8e1aaac189f83d0f828bcdb2986d8d2e51 and fixed in 7.3-rc5 with commit e5843f4effaa2ffac3e789ecd4456403564961d4

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98440

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:

	arch/arm64/include/asm/kvm_nested.h
	arch/arm64/kvm/arm.c
	arch/arm64/kvm/nested.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/876049f026b4dfaca0cc78ec81be0e639ca8525d
	https://git.kernel.org/stable/c/22e82acec93a681071ed36f70eabe2d0c4e0bebd
	https://git.kernel.org/stable/c/5bf1c9175e657b3c2dc1cf77403031ac7aadcf66
	https://git.kernel.org/stable/c/e5843f4effaa2ffac3e789ecd4456403564961d4