Skip to contentSkip to conversation

CVE-2026-46059: KVM: nSVM: Always use NextRIP as vmcb02's NextRIP after first L2 VMRUN

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

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: nSVM: Always use NextRIP as vmcb02's NextRIP after first L2 VMRUN

For guests with NRIPS disabled, L1 does not provide NextRIP when running an L2 with an injected soft interrupt, instead it advances the current RIP before running it. KVM uses the current RIP as the NextRIP in vmcb02 to emulate a CPU without NRIPS.

However, after L2 runs the first time, NextRIP will be updated by the CPU and/or KVM, and the current RIP is no longer the correct value to use in vmcb02. Hence, after save/restore, use the current RIP if and only if a nested run is pending, otherwise use NextRIP. Give soft_int_next_rip the same treatment, as it's the same logic, just for a narrower use case.

[sean: give soft_int_next_rip the same treatment]

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

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

	Issue introduced in 5.8 with commit cc440cdad5b7a4c1de12dace725209eb3e0cf663 and fixed in 6.18.27 with commit 3428ed1529a1af4cce5aff6c5bd2fcc39ad726bb
	Issue introduced in 5.8 with commit cc440cdad5b7a4c1de12dace725209eb3e0cf663 and fixed in 7.0.4 with commit 69fe1411a5ce678b4da6489b5d2282b4e1d13acf
	Issue introduced in 5.8 with commit cc440cdad5b7a4c1de12dace725209eb3e0cf663 and fixed in 7.1-rc1 with commit 8d397582f6b5e9fbcf09781c7c934b4910e94a50

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

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/x86/kvm/svm/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/3428ed1529a1af4cce5aff6c5bd2fcc39ad726bb
	https://git.kernel.org/stable/c/69fe1411a5ce678b4da6489b5d2282b4e1d13acf
	https://git.kernel.org/stable/c/8d397582f6b5e9fbcf09781c7c934b4910e94a50