{"id":"CVE-2021-47062","aliases":["CVE-2021-47062"],"related":[],"kind":"vulnerability","state":"published","title":"KVM: SVM: Use online_vcpus, not created_vcpus, to iterate over vCPUs","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: SVM: Use online_vcpus, not created_vcpus, to iterate over vCPUs\n\nUse the kvm_for_each_vcpu() helper to iterate over vCPUs when encrypting\nVMSAs for SEV, which effectively switches to use online_vcpus instead of\ncreated_vcpus.  This fixes a possible null-pointer dereference as\ncreated_vcpus does not guarantee a vCPU exists, since it is updated at\nthe very beginning of KVM_CREATE_VCPU.  created_vcpus exists to allow the\nbulk of vCPU creation to run in parallel, while still correctly\nrestricting the max number of max vCPUs.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: SVM: Use online_vcpus, not created_vcpus, to iterate over vCPUs\n\nUse the kvm_for_each_vcpu() helper to iterate over vCPUs when encrypting\nVMSAs for SEV, which effectively switches to use online_vcpus instead of\ncreated_vcpus.  This fixes a possible null-pointer dereference as\ncreated_vcpus does not guarantee a vCPU exists, since it is updated at\nthe very beginning of KVM_CREATE_VCPU.  created_vcpus exists to allow the\nbulk of vCPU creation to run in parallel, while still correctly\nrestricting the max number of max vCPUs.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: KVM: SVM: use online_vcpus, no creado_vcpus, para iterar sobre vCPU. Use el asistente kvm_for_each_vcpu() para iterar sobre vCPU al cifrar VMSA para SEV, que efectivamente cambia para usar online_vcpus en lugar de creado_vcpus. Esto corrige una posible desreferencia de puntero nulo ya que create_vcpus no garantiza que exista una vCPU, ya que se actualiza al comienzo de KVM_CREATE_VCPU. create_vcpus existe para permitir que la mayor parte de la creación de vCPU se ejecute en paralelo, al mismo tiempo que restringe correctamente la cantidad máxima de vCPU máximas.","source":"nvd"}],"published":"2024-02-29T22:37:36.468Z","modified":"2026-06-17T04:16:21.307Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"ad73109ae7ec30d5bfb76be108e304f9f0af4829","fixed":"bd0cced2ae93195668f983d443f7f17e8efd24d2","status":"affected"},{"type":"git","introduced":"ad73109ae7ec30d5bfb76be108e304f9f0af4829","fixed":"ba7bf5d6336aa9c0d977b161bfa420c56d46ee40","status":"affected"},{"type":"git","introduced":"ad73109ae7ec30d5bfb76be108e304f9f0af4829","fixed":"c36b16d29f3af5f32fc1b2a3401bf48f71cabee1","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.11","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.11","status":"unaffected"},{"type":"semver","introduced":"5.11.21","lastAffected":"5.11.*","status":"unaffected"},{"type":"semver","introduced":"5.12.4","lastAffected":"5.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.11","fixed":"5.11.21"},{"status":"affected","introduced":"5.12","fixed":"5.12.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/bd0cced2ae93195668f983d443f7f17e8efd24d2","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ba7bf5d6336aa9c0d977b161bfa420c56d46ee40","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c36b16d29f3af5f32fc1b2a3401bf48f71cabee1","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-03-05T22:14:24.335Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47062","url":"https://www.cve.org/CVERecord?id=CVE-2021-47062","licence":"CVE Terms of Use","modified":"2026-05-11T13:47:20.656Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47062","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47062","licence":"Public domain","modified":"2026-06-17T04:16:21.307Z"}],"updatedAt":"2026-11-25T22:58:08.642Z","epss":{"score":0.00222,"percentile":0.13645,"date":"2026-12-01T12:00:22.000Z"}}