CVE-2021-47060

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

7.8 high EPSS 0.24%

Published 29 Feb 2024 Updated 5 Aug 2026 CNA: Linux

Check your servers for CVE-2021-47060

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-47060 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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.

Severity (CVSS)

7.8 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
6.0 medium CVSS 3.1 from CISA (ADP)
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
high: the attacker needs an administrative account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.24%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 16.1% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 5 Mar 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 41b2ea7a6a11e2b1a7f2c29e1675a709a6b2b98d, before 7d1bc32d6477ff96a32695ea4be8144e4513ab2d
affected from f65886606c2d3b562716de030706dfe1bea4ed5e, before 2a20592baff59c5351c5200ec667e1a2aa22af85
affected from f65886606c2d3b562716de030706dfe1bea4ed5e, before 168e82f640ed1891a700bdb43e37da354b2ab63c
affected from f65886606c2d3b562716de030706dfe1bea4ed5e, before 50cbad42bfea8c052b7ca590bd4126cdc898713c
affected from f65886606c2d3b562716de030706dfe1bea4ed5e, before 5d3c4c79384af06e3c8e25b7770b6247496b4417
affected f0dfffce3f4ffd5f822568a4a6fb34c010e939d1
affected 840e124f89a5127e7eb97ebf377f4b8ca745c070
affected 40a023f681befd9b2862a3c16fb306a38b359ae5
affected 19184bd06f488af62924ff1747614a8cb284ad63
affected 68c125324b5e1d1d22805653735442923d896a1d
affected from 5.4.66, before 5.4.119
affected from 4.4.238, before 4.5
affected from 4.9.238, before 4.10
affected from 4.14.200, before 4.15
affected from 4.19.148, before 4.20
affected from 5.8.10, before 5.9
Other versions: unaffected
Linux
affected 5.9
unaffected before 5.9
unaffected from 5.4.119 up to and including 5.4.*
unaffected from 5.10.37 up to and including 5.10.*
unaffected from 5.11.21 up to and including 5.11.*
unaffected from 5.12.4 up to and including 5.12.*
unaffected 5.13 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2021-47060 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2021-47060

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2021-47060
trivy image --scanners vuln IMAGE | grep CVE-2021-47060

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2021-47060 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.