{"id":"CVE-2022-49884","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2025-05-01T15:16:13.387","lastModified":"2026-08-04T10:17:58.087","vulnStatus":"Modified","cveTags":[],"descriptions":[{"lang":"en","value":"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]"},{"lang":"es","value":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: KVM: Inicializar bloqueos de gfn_to_pfn_cache en un asistente dedicado. Trasladar la inicialización del bloqueo de gfn_to_pfn_cache a otro asistente y llamar al nuevo asistente durante la creación de la máquina virtual o la vCPU. Es posible que se produzcan condiciones de competencia debido a la capacidad de kvm_gfn_to_pfn_cache_init() de reinicializar los bloqueos de la caché. Por ejemplo: una competencia entre ioctl(KVM_XEN_HVM_EVTCHN_SEND) y kvm_gfn_to_pfn_cache_init() provoca un bloqueo de gpc de shinfo dañado. (hilo 1) | (hilo 2) | kvm_xen_set_evtchn_fast | read_lock_irqsave(&amp;gpc-&gt;lock, ...) | | kvm_gfn_to_pfn_cache_init | rwlock_init(&amp;gpc-&gt;lock) read_unlock_irqrestore(&amp;gpc-&gt;lock, ...) | Renombra \"cache_init\" y \"cache_destroy\" como activate+deactivate para evitar que la caché se destruya o libere. Ten en cuenta que hay más ejecuciones en el nuevo nombre kvm_gpc_activate() que se abordarán por separado. [sean: se indica que se trata de una corrección de error]"}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["arch/x86/kvm/x86.c","arch/x86/kvm/xen.c","include/linux/kvm_host.h","virt/kvm/pfncache.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"982ed0de4753ed6e71dbd40f82a5a066baf133ed","lessThan":"61242001d6c9c253df7645dab090842d8da08764","versionType":"git","status":"affected"},{"version":"982ed0de4753ed6e71dbd40f82a5a066baf133ed","lessThan":"52491a38b2c2411f3f0229dc6ad610349c704a41","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["arch/x86/kvm/x86.c","arch/x86/kvm/xen.c","include/linux/kvm_host.h","virt/kvm/pfncache.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"5.17","status":"affected"},{"version":"0","lessThan":"5.17","versionType":"semver","status":"unaffected"},{"version":"6.0.8","lessThanOrEqual":"6.0.*","versionType":"semver","status":"unaffected"},{"version":"6.1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9},{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":4.7,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":1.0,"impactScore":3.6}]},"weaknesses":[{"source":"nvd@nist.gov","type":"Primary","description":[{"lang":"en","value":"CWE-362"}]}],"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.17","versionEndExcluding":"6.0.8","matchCriteriaId":"C7CE8283-1C20-4F40-8BE6-BCF33C4080B9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:*","matchCriteriaId":"E7E331DA-1FB0-4DEC-91AC-7DA69D461C11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.1:rc2:*:*:*:*:*:*","matchCriteriaId":"17F0B248-42CF-4AE6-A469-BB1BAE7F4705"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.1:rc3:*:*:*:*:*:*","matchCriteriaId":"E2422816-0C14-4B5E-A1E6-A9D776E5C49B"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/52491a38b2c2411f3f0229dc6ad610349c704a41","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/61242001d6c9c253df7645dab090842d8da08764","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]}]}