CVE-2026-31591: KVM: SEV: Lock all vCPUs when synchronzing VMSAs for SNP launch finish
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
KVM: SEV: Lock all vCPUs when synchronzing VMSAs for SNP launch finish
Lock all vCPUs when synchronizing and encrypting VMSAs for SNP guests, as allowing userspace to manipulate and/or run a vCPU while its state is being synchronized would at best corrupt vCPU state, and at worst crash the host kernel.
Opportunistically assert that vcpu->mutex is held when synchronizing its VMSA (the SEV-ES path already locks vCPUs).
The Linux kernel CVE team has assigned CVE-2026-31591 to this issue.
Affected and fixed versions
===========================
Fixed in 6.18.24 with commit 30fd9d8c82087742168db779929d8be0459b0716 Fixed in 6.19.14 with commit 4df77742e8b9a6b935bdf46f02fd0aca4d4ee7f5 Fixed in 7.0.1 with commit c87938fc7d99a06a7e5477c45b4e5a4148f85d66
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-31591
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/sev.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/30fd9d8c82087742168db779929d8be0459b0716 https://git.kernel.org/stable/c/4df77742e8b9a6b935bdf46f02fd0aca4d4ee7f5 https://git.kernel.org/stable/c/c87938fc7d99a06a7e5477c45b4e5a4148f85d66 https://git.kernel.org/stable/c/cb923ee6a80f4e604e6242a4702b59251e61a380