CVE-2022-48727 KVM: arm64: Avoid consuming a stale esr value when SError occur

High 7.3 Published Updated

A stale register value in KVM arm64 can cause guest instruction corruption, leading to potential denial of service or instability in virtualized environments.

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-2022-48727?

CVE-2022-48727 is a high-severity vulnerability in Linux kernel, published on 20 Jun 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: Avoid consuming a stale esr value when SError occur

When any exception other than an IRQ occurs, the CPU updates the ESR_EL2 register with the exception syndrome. An SError may also become pending, and will be synchronised by KVM. KVM notes the exception type, and whether an SError was synchronised in exit_code.

When an exception other than an IRQ occurs, fixup_guest_exit() updates vcpu->arch.fault.esr_el2 from the hardware register. When an SError was synchronised, the vcpu esr value is used to determine if the exception was due to an HVC. If so, ELR_EL2 is moved back one instruction. This is so that KVM can process the SError first, and re-execute the HVC if the guest survives the SError.

But if an IRQ synchronises an SError, the vcpu's esr value is stale. If the previous non-IRQ exception was an HVC, KVM will corrupt ELR_EL2, causing an unrelated guest instruction to be executed twice.

Check ARM_EXCEPTION_CODE() before messing with ELR_EL2, IRQs don't update this register so don't need to check.

Which versions are affected by CVE-2022-48727?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-48727?

Apply the vendor's patch.

Is CVE-2022-48727 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-48727, GHSA-hhpm-mjg9-jj2m, UBUNTU-CVE-2022-48727.

Is CVE-2022-48727 in your software?

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

Check your SBOMs for free