CVE-2021-47062 KVM: SVM: Use online_vcpus, not created_vcpus, to iterate over vCPUs
A null pointer dereference in the Linux kernel's KVM SVM module can cause a denial of service when SEV is enabled.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2021-47062?
CVE-2021-47062 is a medium-severity vulnerability in Linux kernel, published on 29 Feb 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-476
Which versions are affected by CVE-2021-47062?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-47062?
No fix has been published for CVE-2021-47062 yet. Limit exposure of the affected software until one is available.
Is CVE-2021-47062 being exploited?
There is no known exploitation of CVE-2021-47062 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as GHSA-2948-3mj2-4gw2, UBUNTU-CVE-2021-47062.