Lucene search

K
cve416baaa9-dc9f-4396-8d5f-8c081fb06d67CVE-2021-47060
HistoryFeb 29, 2024 - 11:15 p.m.

CVE-2021-47060

2024-02-2923:15:07
416baaa9-dc9f-4396-8d5f-8c081fb06d67
web.nvd.nist.gov
2019
cve-2021-47060
linux kernel
kvm
vulnerability
security
memory allocation
destructor
for-loop
nvd

6.5 Medium

AI Score

Confidence

Low

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.

Affected configurations

Vulners
Node
linuxlinux_kernelRange5.95.4.119
OR
linuxlinux_kernelRange5.5.05.10.37
OR
linuxlinux_kernelRange5.11.05.11.21
OR
linuxlinux_kernelRange5.12.05.12.4
OR
linuxlinux_kernelRange5.13.0
VendorProductVersionCPE
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

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"
      }
    ]
  }
]

6.5 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.7%