cve.bz

CVE-2022-49882 linux linux kernel: Use After Free

7.8 highEPSS 0.2%Fix available

High (7.8) in linux linux kernel. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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)

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 9th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-10-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-416 Use After Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-49882 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-49882?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-49882?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-49882 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux5.17 and later

Fixed in

ProductRelease lineFixed in
Linux6.06.0.8
Linuxlater releases6.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14linux6.0.8-1DEBIAN-CVE-2022-49882
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2022-49882
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2022-49882
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2022-49882
Ubuntu22.04:LTSlinux-riscv, linux-aws-6.2, linux-aws-6.5 and 30 moreno fix listedUBUNTU-CVE-2022-49882
Ubuntu24.04:LTSlinux-realtime, linux-raspi-realtimeno fix listedUBUNTU-CVE-2022-49882
Red Hatenterprise_linux:9::appstreamrv, perf, rtla and 24 more0:5.14.0-362.8.1.el9_3RHSA-2023:6583
Red Hatenterprise_linux:9::appstream, enterprise_linux:9::crb, enterprise_linux:9::nfv and 1 morebpftool-debuginfo0:7.2.0-362.8.1.el9_3RHSA-2023:6583
Red Hatenterprise_linux:9::baseosbpftool, bpftool-debuginfo0:7.2.0-362.8.1.el9_3RHSA-2023:6583
Red Hatenterprise_linux:9::baseoskernel, kernel-64k, kernel-core and 41 more0:5.14.0-362.8.1.el9_3RHSA-2023:6583
Red Hatenterprise_linux:9::crblibperf, perf-debuginfo, kernel-debuginfo and 12 more0:5.14.0-362.8.1.el9_3RHSA-2023:6583
Red Hatenterprise_linux:9::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 20 more0:5.14.0-362.8.1.el9_3RHSA-2023:6583
Red Hatenterprise_linux:9::realtimekernel-rt, kernel-rt-core, perf-debuginfo and 18 more0:5.14.0-362.8.1.el9_3RHSA-2023:6583

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability is rated as Moderate impact for Red Hat Enterprise Linux because exploitation requires local access with permissions to execute specific KVM ioctl operations, restricting the attack surface and blast radius to a host denial of service. Under default deployment models, access to the KVM device node is restricted to privileged processes, preventing unprivileged users from directly issuing virtualization controls. Triggering the flaw relies on racing Xen-emulation attributes and event-channel commands against guest frame caching routines, making remote or unauthorized execution unfeasible.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelNot affected
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelFix deferred
Red Hat Enterprise Linux 9kernel-rtFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-49882.

References

Check your stackJSON