cve-2022-49884
Vulnerability from cvelistv5
Published
2025-05-01 14:10
Modified
2025-05-01 14:10
Severity ?
EPSS score ?
Summary
KVM: Initialize gfn_to_pfn_cache locks in dedicated helper
References
{ "containers": { "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "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", "vendor": "Linux", "versions": [ { "lessThan": "61242001d6c9c253df7645dab090842d8da08764", "status": "affected", "version": "982ed0de4753ed6e71dbd40f82a5a066baf133ed", "versionType": "git" }, { "lessThan": "52491a38b2c2411f3f0229dc6ad610349c704a41", "status": "affected", "version": "982ed0de4753ed6e71dbd40f82a5a066baf133ed", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "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", "vendor": "Linux", "versions": [ { "status": "affected", "version": "5.17" }, { "lessThan": "5.17", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "6.0.*", "status": "unaffected", "version": "6.0.8", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "6.1", "versionType": "original_commit_for_fix" } ] } ], "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()\u0027s\nability to re-initialize the cache\u0027s 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(\u0026gpc-\u003elock, ...) |\n | kvm_gfn_to_pfn_cache_init\n | rwlock_init(\u0026gpc-\u003elock)\n read_unlock_irqrestore(\u0026gpc-\u003elock, ...) |\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]" } ], "providerMetadata": { "dateUpdated": "2025-05-01T14:10:30.589Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/61242001d6c9c253df7645dab090842d8da08764" }, { "url": "https://git.kernel.org/stable/c/52491a38b2c2411f3f0229dc6ad610349c704a41" } ], "title": "KVM: Initialize gfn_to_pfn_cache locks in dedicated helper", "x_generator": { "engine": "bippy-1.1.0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2022-49884", "datePublished": "2025-05-01T14:10:30.589Z", "dateReserved": "2025-05-01T14:05:17.241Z", "dateUpdated": "2025-05-01T14:10:30.589Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2022-49884\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-05-01T15:16:13.387\",\"lastModified\":\"2025-05-01T15:16:13.387\",\"vulnStatus\":\"Received\",\"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()\u0027s\\nability to re-initialize the cache\u0027s 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(\u0026gpc-\u003elock, ...) |\\n | kvm_gfn_to_pfn_cache_init\\n | rwlock_init(\u0026gpc-\u003elock)\\n read_unlock_irqrestore(\u0026gpc-\u003elock, ...) |\\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]\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/52491a38b2c2411f3f0229dc6ad610349c704a41\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/61242001d6c9c253df7645dab090842d8da08764\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}" } }
Loading...
Loading...
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.