CVE-2021-47008 KVM: SVM: Make sure GHCB is mapped before updating

Medium 5.5 Published Updated

A missing check in the Linux kernel KVM SVM module allows a local attacker to trigger a NULL pointer dereference, causing a system crash.

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-47008?

CVE-2021-47008 is a medium-severity vulnerability in Linux kernel, published on 28 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: Make sure GHCB is mapped before updating

Access to the GHCB is mainly in the VMGEXIT path and it is known that the GHCB will be mapped. But there are two paths where it is possible the GHCB might not be mapped.

The sev_vcpu_deliver_sipi_vector() routine will update the GHCB to inform the caller of the AP Reset Hold NAE event that a SIPI has been delivered. However, if a SIPI is performed without a corresponding AP Reset Hold, then the GHCB might not be mapped (depending on the previous VMEXIT), which will result in a NULL pointer dereference.

The svm_complete_emulated_msr() routine will update the GHCB to inform the caller of a RDMSR/WRMSR operation about any errors. While it is likely that the GHCB will be mapped in this situation, add a safe guard in this path to be certain a NULL pointer dereference is not encountered.

Weakness: CWE-476

Which versions are affected by CVE-2021-47008?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47008?

No fix has been published for CVE-2021-47008 yet. Limit exposure of the affected software until one is available.

Is CVE-2021-47008 being exploited?

There is no known exploitation of CVE-2021-47008 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as GHSA-9pjj-2jvj-24rm, UBUNTU-CVE-2021-47008.

Is CVE-2021-47008 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free