CVE-2022-49884 KVM: Initialize gfn_to_pfn_cache locks in dedicated helper
A race condition in KVM's gfn_to_pfn_cache lock initialization can lead to corrupted locks and potential system instability or denial of service.
- 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-49884?
CVE-2022-49884 is a high-severity vulnerability in Linux kernel, published on 1 May 2025. 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: Initialize gfn_to_pfn_cache locks in dedicated helper
Move the gfn_to_pfn_cache lock initialization to another helper and call the new helper during VM/vCPU creation. There are race conditions possible due to kvm_gfn_to_pfn_cache_init()'s ability to re-initialize the cache's locks.
For example: a race between ioctl(KVM_XEN_HVM_EVTCHN_SEND) and kvm_gfn_to_pfn_cache_init() leads to a corrupted shinfo gpc lock.
(thread 1) | (thread 2) | kvm_xen_set_evtchn_fast | read_lock_irqsave(&gpc->lock, ...) | | kvm_gfn_to_pfn_cache_init | rwlock_init(&gpc->lock) read_unlock_irqrestore(&gpc->lock, ...) |
Rename "cache_init" and "cache_destroy" to activate+deactivate to avoid implying that the cache really is destroyed/freed.
Note, there more races in the newly named kvm_gpc_activate() that will be addressed separately.
[sean: call out that this is a bug fix]
Weakness: CWE-362
Which versions are affected by CVE-2022-49884?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-49884?
Apply the vendor's patch.
Is CVE-2022-49884 being exploited?
There is no known exploitation of CVE-2022-49884 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2022-49884, GHSA-4m85-4x3p-6jmv, UBUNTU-CVE-2022-49884.