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

- Severity: High 7.3 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 14% of CVEs (2026-12-02)
- Published: 2024-06-20T11:13:16.668Z
- Modified: 2026-08-05T08:51:59.189Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from defe21f49bc98b095300752aa1e19bb608f3e97d before e1e852746997500f1873f60b954da5f02cc2dba3; from defe21f49bc98b095300752aa1e19bb608f3e97d before 57e2986c3b25092691a6e3d6ee9168caf8978932; from defe21f49bc98b095300752aa1e19bb608f3e97d before 1c71dbc8a179d99dd9bb7e7fc1888db613cf85de; 5.11 (not affected: before 5.11; from 5.15.22 up to 5.15.*; from 5.16.8 up to 5.16.*; from 5.17 up to *)
- linux linux_kernel: from 5.11 before 5.15.22; from 5.16 before 5.16.8; 5.17

## Every score

- Linux: CVSS:3.1 7.3 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/e1e852746997500f1873f60b954da5f02cc2dba3> (patch)
- <https://git.kernel.org/stable/c/57e2986c3b25092691a6e3d6ee9168caf8978932> (patch)
- <https://git.kernel.org/stable/c/1c71dbc8a179d99dd9bb7e7fc1888db613cf85de> (patch)

## Sources

- CVE List: [CVE-2022-48727](https://www.cve.org/CVERecord?id=CVE-2022-48727), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2022-48727](https://nvd.nist.gov/vuln/detail/CVE-2022-48727), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2022-48727 · Whole record: https://cve.day/CVE-2022-48727.json · Rebuilt by cve.day 2026-11-25T22:58:19.838Z
