{"id":"CVE-2022-49884","published":"2025-05-01T14:10:30Z","modified":"2026-08-05T08:56:33Z","title":"KVM: Initialize gfn_to_pfn_cache locks in dedicated helper","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: Initialize gfn_to_pfn_cache locks in dedicated helper\n\nMove the gfn_to_pfn_cache lock initialization to another helper and\ncall the new helper during VM/vCPU creation.  There are race\nconditions possible due to kvm_gfn_to_pfn_cache_init()'s\nability to re-initialize the cache's locks.\n\nFor example: a race between ioctl(KVM_XEN_HVM_EVTCHN_SEND) and\nkvm_gfn_to_pfn_cache_init() leads to a corrupted shinfo gpc lock.\n\n                (thread 1)                |           (thread 2)\n                                          |\n kvm_xen_set_evtchn_fast                  |\n  read_lock_irqsave(&gpc->lock, ...)      |\n                                          | kvm_gfn_to_pfn_cache_init\n                                          |  rwlock_init(&gpc->lock)\n  read_unlock_irqrestore(&gpc->lock, ...) |\n\nRename \"cache_init\" and \"cache_destroy\" to activate+deactivate to\navoid implying that the cache really is destroyed/freed.\n\nNote, there more races in the newly named kvm_gpc_activate() that will\nbe addressed separately.\n\n[sean: call out that this is a bug fix]","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00185,"percentile":0.04721,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/61242001d6c9c253df7645dab090842d8da08764","tags":[]},{"url":"https://git.kernel.org/stable/c/52491a38b2c2411f3f0229dc6ad610349c704a41","tags":[]}],"priority":{"score":6.4,"factors":[{"name":"EPSS percentile","points":0.94},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 982ed0de4753ed6e71dbd40f82a5a066baf133ed, < 61242001d6c9c253df7645dab090842d8da08764",">= 982ed0de4753ed6e71dbd40f82a5a066baf133ed, < 52491a38b2c2411f3f0229dc6ad610349c704a41"]},{"vendor":"Linux","product":"Linux","versions":["5.17"]}],"euvd":{"id":"EUVD-2025-12897","exploited":false,"provenance":"source"}}