CVE-2021-47062

KVM: SVM: Use online_vcpus, not created_vcpus, to iterate over vCPUs

MEDIUM
5.5
CVSS Score
Published: February 29, 2024 at 10:37 PM UTC
Updated: June 17, 2026 at 04:16 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: KVM: SVM: Use online_vcpus, not created_vcpus, to iterate over vCPUs Use the kvm_for_each_vcpu() helper to iterate over vCPUs when encrypting VMSAs for SEV, which effectively switches to use online_vcpus instead of created_vcpus. This fixes a possible null-pointer dereference as created_vcpus does not guarantee a vCPU exists, since it is updated at the very beginning of KVM_CREATE_VCPU. created_vcpus exists to allow the bulk of vCPU creation to run in parallel, while still correctly restricting the max number of max vCPUs.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.11 ≤ v < 5.11.215.11 ≤ v < 5.12.45.11 ≤ v < 5.135.12 ≤ v < 5.12.45.11ad73109ae7ec30d5bfb76be108e304f9f0af4829
Vendor states this is fixed in ba7bf5d6336aa9c0d977b161bfa420c56d46ee40 (fixed)
Vendor states this is fixed in bd0cced2ae93195668f983d443f7f17e8efd24d2 (fixed)
Vendor states this is fixed in c36b16d29f3af5f32fc1b2a3401bf48f71cabee1 (fixed)
Vendor states this is fixed in 5.11 (unaffected)
Vendor states this is fixed in 5.11.21 (unaffected)
Vendor states this is fixed in 5.12.4 (unaffected)
Vendor states this is fixed in 5.13 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ba7bf5d6336aa9c0d977b161bfa420c56d46ee40
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/bd0cced2ae93195668f983d443f7f17e8efd24d2
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c36b16d29f3af5f32fc1b2a3401bf48f71cabee1

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card