{"id":"CVE-2022-48727","state":"PUBLISHED","title":"KVM: arm64: Avoid consuming a stale esr value when SError occur","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: arm64: Avoid consuming a stale esr value when SError occur\n\nWhen any exception other than an IRQ occurs, the CPU updates the ESR_EL2\nregister with the exception syndrome. An SError may also become pending,\nand will be synchronised by KVM. KVM notes the exception type, and whether\nan SError was synchronised in exit_code.\n\nWhen an exception other than an IRQ occurs, fixup_guest_exit() updates\nvcpu->arch.fault.esr_el2 from the hardware register. When an SError was\nsynchronised, the vcpu esr value is used to determine if the exception\nwas due to an HVC. If so, ELR_EL2 is moved back one instruction. This\nis so that KVM can process the SError first, and re-execute the HVC if\nthe guest survives the SError.\n\nBut if an IRQ synchronises an SError, the vcpu's esr value is stale.\nIf the previous non-IRQ exception was an HVC, KVM will corrupt ELR_EL2,\ncausing an unrelated guest instruction to be executed twice.\n\nCheck ARM_EXCEPTION_CODE() before messing with ELR_EL2, IRQs don't\nupdate this register so don't need to check.","publishedAt":"2024-06-20T11:13:16.668Z","updatedAt":"2026-08-05T08:51:59.189Z","severity":{"score":7.3,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"defe21f49bc98b095300752aa1e19bb608f3e97d","status":"affected","lessThan":"e1e852746997500f1873f60b954da5f02cc2dba3","versionType":"git"},{"version":"defe21f49bc98b095300752aa1e19bb608f3e97d","status":"affected","lessThan":"57e2986c3b25092691a6e3d6ee9168caf8978932","versionType":"git"},{"version":"defe21f49bc98b095300752aa1e19bb608f3e97d","status":"affected","lessThan":"1c71dbc8a179d99dd9bb7e7fc1888db613cf85de","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/arm64/kvm/hyp/include/hyp/switch.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.22","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16.8","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/arm64/kvm/hyp/include/hyp/switch.h"]}],"references":["https://git.kernel.org/stable/c/e1e852746997500f1873f60b954da5f02cc2dba3","https://git.kernel.org/stable/c/57e2986c3b25092691a6e3d6ee9168caf8978932","https://git.kernel.org/stable/c/1c71dbc8a179d99dd9bb7e7fc1888db613cf85de"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/48xxx/CVE-2022-48727.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-48727","state":"PUBLISHED","datePublished":"2024-06-20T11:13:16.668Z","dateUpdated":"2026-08-05T08:51:59.189Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-06-20T11:09:39.052Z"},"containers":{"cna":{"title":"KVM: arm64: Avoid consuming a stale esr value when SError occur","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: arm64: Avoid consuming a stale esr value when SError occur\n\nWhen any exception other than an IRQ occurs, the CPU updates the ESR_EL2\nregister with the exception syndrome. An SError may also become pending,\nand will be synchronised by KVM. KVM notes the exception type, and whether\nan SError was synchronised in exit_code.\n\nWhen an exception other than an IRQ occurs, fixup_guest_exit() updates\nvcpu->arch.fault.esr_el2 from the hardware register. When an SError was\nsynchronised, the vcpu esr value is used to determine if the exception\nwas due to an HVC. If so, ELR_EL2 is moved back one instruction. This\nis so that KVM can process the SError first, and re-execute the HVC if\nthe guest survives the SError.\n\nBut if an IRQ synchronises an SError, the vcpu's esr value is stale.\nIf the previous non-IRQ exception was an HVC, KVM will corrupt ELR_EL2,\ncausing an unrelated guest instruction to be executed twice.\n\nCheck ARM_EXCEPTION_CODE() before messing with ELR_EL2, IRQs don't\nupdate this register so don't need to check."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"defe21f49bc98b095300752aa1e19bb608f3e97d","status":"affected","lessThan":"e1e852746997500f1873f60b954da5f02cc2dba3","versionType":"git"},{"version":"defe21f49bc98b095300752aa1e19bb608f3e97d","status":"affected","lessThan":"57e2986c3b25092691a6e3d6ee9168caf8978932","versionType":"git"},{"version":"defe21f49bc98b095300752aa1e19bb608f3e97d","status":"affected","lessThan":"1c71dbc8a179d99dd9bb7e7fc1888db613cf85de","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/arm64/kvm/hyp/include/hyp/switch.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.22","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16.8","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/arm64/kvm/hyp/include/hyp/switch.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/e1e852746997500f1873f60b954da5f02cc2dba3"},{"url":"https://git.kernel.org/stable/c/57e2986c3b25092691a6e3d6ee9168caf8978932"},{"url":"https://git.kernel.org/stable/c/1c71dbc8a179d99dd9bb7e7fc1888db613cf85de"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H","baseScore":7.3,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is in KVM arm64 hyp `fixup_guest_exit()` during a guest exit; it is reached only by running an arm64 KVM guest (or locally via /dev/kvm), not by network packet processing or physical device attachment.\nAC:L - A guest can poison `vcpu->arch.fault.esr_el2` with HVC, IRQs occur routinely, and on worst-case arm64 deployments (assigned devices/RAS) the guest can induce a pending SError that is synchronized on IRQ exit—no attacker-uncontrollable lottery beyond that.\nPR:L - Triggering needs only the ability to run guest code under KVM; /dev/kvm is typically reachable by an unprivileged kvm-group user, and a cloud/Android tenant guest needs no host CAP_SYS_ADMIN.\nUI:N - The attacker drives guest HVC activity and the SError/IRQ exit path themselves; no separate victim action such as mounting a filesystem is required.\nS:C - The defect is in the host hypervisor, but the corrupted resource is guest ELR/PC saved into `ctxt->regs.pc`, so impact lands in the guest OS—a distinct security authority (same pattern as CVE-2025-21839).\nC:N - The bug only subtracts 4 from guest ELR when a stale ESR looks like HVC; it does not disclose host or cross-VM memory and provides no read primitive.\nI:L - KVM corrupts guest control flow by re-executing one unrelated instruction (PC-=4), which can alter guest state, but the modification is confined to that single rollback and is not an arbitrary write or host memory corruption.\nA:H - Resuming the guest at the wrong PC after SError handling can crash, hang, or permanently mis-execute the guest workload, fully denying availability of that VM."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:51:59.189Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.15.22"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.16.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.17"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-06-20T16:20:44.710184Z","id":"CVE-2022-48727","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-20T16:20:53.835Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/e1e852746997500f1873f60b954da5f02cc2dba3","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/57e2986c3b25092691a6e3d6ee9168caf8978932","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/1c71dbc8a179d99dd9bb7e7fc1888db613cf85de","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T15:24:59.975Z"}}]}}}