Lucene search

K
cvelistLinuxCVELIST:CVE-2021-47060
HistoryFeb 29, 2024 - 10:37 p.m.

CVE-2021-47060 KVM: Stop looking for coalesced MMIO zones if the bus is destroyed

2024-02-2922:37:34
Linux
www.cve.org
kvm
linux
kernel
vulnerability
coalesced mmio
bus
memory
destructor
dereference
iterating

7.7 High

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

15.7%

In the Linux kernel, the following vulnerability has been resolved:

KVM: Stop looking for coalesced MMIO zones if the bus is destroyed

Abort the walk of coalesced MMIO zones if kvm_io_bus_unregister_dev()
fails to allocate memory for the new instance of the bus. If it can’t
instantiate a new bus, unregister_dev() destroys all devices except the
target device. But, it doesn’t tell the caller that it obliterated the
bus and invoked the destructor for all devices that were on the bus. In
the coalesced MMIO case, this can result in a deleted list entry
dereference due to attempting to continue iterating on coalesced_zones
after future entries (in the walk) have been deleted.

Opportunistically add curly braces to the for-loop, which encompasses
many lines but sneaks by without braces due to the guts being a single
if statement.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "include/linux/kvm_host.h",
      "virt/kvm/coalesced_mmio.c",
      "virt/kvm/kvm_main.c"
    ],
    "versions": [
      {
        "version": "41b2ea7a6a11",
        "lessThan": "7d1bc32d6477",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "f65886606c2d",
        "lessThan": "2a20592baff5",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "f65886606c2d",
        "lessThan": "168e82f640ed",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "f65886606c2d",
        "lessThan": "50cbad42bfea",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "f65886606c2d",
        "lessThan": "5d3c4c79384a",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "include/linux/kvm_host.h",
      "virt/kvm/coalesced_mmio.c",
      "virt/kvm/kvm_main.c"
    ],
    "versions": [
      {
        "version": "5.9",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "5.9",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.4.119",
        "lessThanOrEqual": "5.4.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.37",
        "lessThanOrEqual": "5.10.*",
        "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"
      }
    ]
  }
]

7.7 High

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

15.7%