{
   "containers": {
      "cna": {
         "providerMetadata": {
            "orgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038"
         },
         "descriptions": [
            {
               "lang": "en",
               "value": "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."
            }
         ],
         "affected": [
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "unaffected",
               "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               "programFiles": [
                  "arch/x86/kvm/svm/sev.c"
               ],
               "versions": [
                  {
                     "version": "ad73109ae7ec",
                     "lessThan": "bd0cced2ae93",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "ad73109ae7ec",
                     "lessThan": "ba7bf5d6336a",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "ad73109ae7ec",
                     "lessThan": "c36b16d29f3a",
                     "status": "affected",
                     "versionType": "git"
                  }
               ]
            },
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "affected",
               "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               "programFiles": [
                  "arch/x86/kvm/svm/sev.c"
               ],
               "versions": [
                  {
                     "version": "5.11",
                     "status": "affected"
                  },
                  {
                     "version": "0",
                     "lessThan": "5.11",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.11.21",
                     "lessThanOrEqual": "5.11.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.12.4",
                     "lessThanOrEqual": "5.12.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.13",
                     "lessThanOrEqual": "*",
                     "status": "unaffected",
                     "versionType": "original_commit_for_fix"
                  }
               ]
            }
         ],
         "references": [
            {
               "url": "https://git.kernel.org/stable/c/bd0cced2ae93195668f983d443f7f17e8efd24d2"
            },
            {
               "url": "https://git.kernel.org/stable/c/ba7bf5d6336aa9c0d977b161bfa420c56d46ee40"
            },
            {
               "url": "https://git.kernel.org/stable/c/c36b16d29f3af5f32fc1b2a3401bf48f71cabee1"
            }
         ],
         "title": "KVM: SVM: Use online_vcpus, not created_vcpus, to iterate over vCPUs",
         "x_generator": {
            "engine": "bippy-a5840b7849dd"
         }
      }
   },
   "cveMetadata": {
      "assignerOrgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038",
      "cveID": "CVE-2021-47062",
      "requesterUserId": "gregkh@kernel.org",
      "serial": "1",
      "state": "PUBLISHED"
   },
   "dataType": "CVE_RECORD",
   "dataVersion": "5.0"
}
