CVE-2021-47450 KVM: arm64: Fix host stage-2 PGD refcount

High 8.8 Published Updated

A refcounting error in Linux KVM arm64 protected mode can corrupt page tables, potentially allowing attackers to execute code or escalate privileges.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2021-47450?

CVE-2021-47450 is a high-severity memory corruption vulnerability in Linux kernel, published on 22 May 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: arm64: Fix host stage-2 PGD refcount

The KVM page-table library refcounts the pages of concatenated stage-2 PGDs individually. However, when running KVM in protected mode, the host's stage-2 PGD is currently managed by EL2 as a single high-order compound page, which can cause the refcount of the tail pages to reach 0 when they shouldn't, hence corrupting the page-table.

Fix this by introducing a new hyp_split_page() helper in the EL2 page allocator (matching the kernel's split_page() function), and make use of it from host_s2_zalloc_pages_exact().

Which versions are affected by CVE-2021-47450?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47450?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-47450 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47450, GHSA-cmcr-4938-mjgj, UBUNTU-CVE-2021-47450.

Is CVE-2021-47450 in your software?

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

Check your SBOMs for free