Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2022-49882

HIGH 7.8EPSS 13%

KVM: Reject attempts to consume or refresh inactive gfn_to_pfn_cache

Mitigation

  • No fix listed yet: follow the vendor advisory.

Who should check

  • Anyone running Linux >= 982ed0de4753ed6e71dbd40f82a5a066baf133ed, < bfa9672f8fc9eb118124bab61899d2dd497f95ba; >= 982ed0de4753ed6e71dbd40f82a5a066baf133ed, < ecbcf030b45666ad11bc98565e71dfbcb7be4393
  • Anyone running Linux 5.17

Vulnerability facts

Affected
Linux >= 982ed0de4753ed6e71dbd40f82a5a066baf133ed, < bfa9672f8fc9eb118124bab61899d2dd497f95ba; >= 982ed0de4753ed6e71dbd40f82a5a066baf133ed, < ecbcf030b45666ad11bc98565e71dfbcb7be4393; Linux 5.17
Fixed in
No fix listed yet
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: High
EPSS
0.28% chance of exploitation in 30 days (percentile 13, 2026-11-26)
CWE
CWE-416
Published
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: KVM: Reject attempts to consume or refresh inactive gfn_to_pfn_cache Reject kvm_gpc_check() and kvm_gpc_refresh() if the cache is inactive. Not checking the active flag during refresh is particularly egregious, as KVM can end up with a valid, inactive cache, which can lead to a variety of use-after-free bugs, e.g. consuming a NULL kernel pointer or missing an mmu_notifier invalidation due to the cache not being on the list of gfns to invalidate. Note, "active" needs to be set if and only if the cache is on the list of caches, i.e. is reachable via mmu_notifier events. If a relevant mmu_notifier event occurs while the cache is "active" but not on the list, KVM will not acquire the cache's lock and so will not serailize the mmu_notifier event with active users and/or kvm_gpc_refresh(). A race between KVM_XEN_ATTR_TYPE_SHARED_INFO and KVM_XEN_HVM_EVTCHN_SEND can be exploited to trigger the bug. 1. Deactivate shinfo cache: kvm_xen_hvm_set_attr case KVM_XEN_ATTR_TYPE_SHARED_INFO kvm_gpc_deactivate kvm_gpc_unmap gpc->valid = false gpc->khva = NULL gpc->active = false Result: active = false, valid = false 2. Cause cache refresh: kvm_arch_vm_ioctl case KVM_XEN_HVM_EVTCHN_SEND kvm_xen_hvm_evtchn_send kvm_xen_set_evtchn kvm_xen_set_evtchn_fast kvm_gpc_check return -EWOULDBLOCK because !gpc->valid kvm_xen_set_evtchn_fast return -EWOULDBLOCK kvm_gpc_refresh hva_to_pfn_retry gpc->valid = true gpc->khva = not NULL Result: active = false, valid = true 3. Race ioctl KVM_XEN_HVM_EVTCHN_SEND against ioctl KVM_XEN_ATTR_TYPE_SHARED_INFO: kvm_arch_vm_ioctl case KVM_XEN_HVM_EVTCHN_SEND kvm_xen_hvm_evtchn_send kvm_xen_set_evtchn kvm_xen_set_evtchn_fast read_lock gpc->lock kvm_xen_hvm_set_attr case KVM_XEN_ATTR_TYPE_SHARED_INFO mutex_lock kvm->lock kvm_xen_shared_info_init kvm_gpc_activate gpc->khva = NULL kvm_gpc_check [ Check passes because gpc->valid is still true, even though gpc->khva is already NULL. ] shinfo = gpc->khva pending_bits = shinfo->evtchn_pending CRASH: test_and_set_bit(..., pending_bits)

Affected and fixed versions

Package / productAffectedFixedSource
Linux>= 982ed0de4753ed6e71dbd40f82a5a066baf133ed, < bfa9672f8fc9eb118124bab61899d2dd497f95ba; >= 982ed0de4753ed6e71dbd40f82a5a066baf133ed, < ecbcf030b45666ad11bc98565e71dfbcb7be4393—cvelist
Linux5.17—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2022-49882. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49882.md
Affected: Linux >= 982ed0de4753ed6e71dbd40f82a5a066baf133ed, < bfa9672f8fc9eb118124bab61899d2dd497f95ba; >= 982ed0de4753ed6e71dbd40f82a5a066baf133ed, < ecbcf030b45666ad11bc98565e71dfbcb7be4393; Linux 5.17
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2022-49882 being exploited?

There is no confirmed exploitation: CVE-2022-49882 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2022-49882?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

Which versions are affected by CVE-2022-49882?

Linux >= 982ed0de4753ed6e71dbd40f82a5a066baf133ed, < bfa9672f8fc9eb118124bab61899d2dd497f95ba; >= 982ed0de4753ed6e71dbd40f82a5a066baf133ed, < ecbcf030b45666ad11bc98565e71dfbcb7be4393; Linux 5.17.

Is there a fix for CVE-2022-49882?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

How do I check if I'm affected by CVE-2022-49882?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors