# CVE-2022-49884: KVM: Initialize gfn_to_pfn_cache locks in dedicated helper

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2025-05-01T14:10:30.589Z
- Modified: 2026-08-05T08:56:33.067Z
- Weaknesses: CWE-362
- Assigned by: Linux

## 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]

(As written by CVE List.)

## Affected

- Linux Linux: from 982ed0de4753ed6e71dbd40f82a5a066baf133ed before 61242001d6c9c253df7645dab090842d8da08764; from 982ed0de4753ed6e71dbd40f82a5a066baf133ed before 52491a38b2c2411f3f0229dc6ad610349c704a41; 5.17 (not affected: before 5.17; from 6.0.8 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 5.17 before 6.0.8; 6.1

## Every score

- Linux: 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`
- NVD: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/61242001d6c9c253df7645dab090842d8da08764> (patch)
- <https://git.kernel.org/stable/c/52491a38b2c2411f3f0229dc6ad610349c704a41> (patch)

## Sources

- CVE List: [CVE-2022-49884](https://www.cve.org/CVERecord?id=CVE-2022-49884), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2022-49884](https://nvd.nist.gov/vuln/detail/CVE-2022-49884), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2022-49884 · Whole record: https://cve.day/CVE-2022-49884.json · Rebuilt by cve.day 2026-11-25T22:58:20.918Z
