CVE-2022-49884CWE-362

CVE-2022-49884

High · published May 1, 2025

CVSS v3.1
7.8
EPSS
0%
Percentile
2.2
In the wild
Unconfirmed
What it is

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]

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00127 · 2.2th percentile
Weakness
CWE-362 · Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Published
2025-05-01T19:16Z
Affected products (4)
ProductVersionsFixed in
linux/linux_kernel≥ 5.17, < 6.0.86.0.8
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
References (2)
EPSS history
Timeline
  • 01 MAY 14:10Z
    KVM: Initialize gfn_to_pfn_cache locks in dedicated helper
    cvelistv5