Skip to contentSkip to conversation

CVE-2026-98638: KVM: arm64: Validate the SVE vector length in pkvm_vcpu_init_sve()

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: Validate the SVE vector length in pkvm_vcpu_init_sve()

pkvm_vcpu_init_sve() clamps only the upper bound of the host-provided sve_max_vl, so an invalid vector length reaches sve_state_size_from_vl() and the WARN_ON() there, which is fatal at EL2. The existing !sve_state_size test rejects such a length, but only after the macro has run.

Check sve_vl_valid() before deriving the state size. A valid length cannot yield a zero size, so the !sve_state_size test goes with it.

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

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

	Issue introduced in 6.16 with commit 5db1bef933427aa467ad89c7b695a84a6b4afe16 and fixed in 6.18.55 with commit faf66e55e87498ab4bf88cdf9a629e61b3f2d3bc
	Issue introduced in 6.16 with commit 5db1bef933427aa467ad89c7b695a84a6b4afe16 and fixed in 7.2.9 with commit bae3e4493046de4fefa15f809d9b8dc114e84a3d
	Issue introduced in 6.16 with commit 5db1bef933427aa467ad89c7b695a84a6b4afe16 and fixed in 7.3-rc5 with commit 2a2eb10795a1e495aebc7f829ccecb72c05b4fd9

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-98638

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/kvm/hyp/nvhe/pkvm.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/faf66e55e87498ab4bf88cdf9a629e61b3f2d3bc
	https://git.kernel.org/stable/c/bae3e4493046de4fefa15f809d9b8dc114e84a3d
	https://git.kernel.org/stable/c/2a2eb10795a1e495aebc7f829ccecb72c05b4fd9