CVE Database›Document archive›CVE-2022-49884

CVE-2022-49884

kernel: KVM: Initialize gfn_to_pfn_cache locks in dedicated helper

Loading…

Severity

Moderate

Red Hat Product Security

4.4

CVSS 3.1

Review impact separately from score.

Published · May 1, 2025

Updated · August 5, 2026

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]

Statement

A race condition in kvm_gfn_to_pfn_cache_init() may lead to reinitialization of synchronization primitives (rwlock_t) while concurrently in use, potentially corrupting kernel lock state and causing denial-of-service.

Privileges Required: High – Exploiting this bug requires root or a process with access to KVM ioctls, which is not available to unprivileged users.

Although not directly exploitable for information disclosure or integrity modification, the flaw can cause a kernel crash and impact system availability within a virtualized environment.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 4.4
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H

CWE-362 · Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')