Cloudanix VulnDB

CVE-2021-45464

High · 8.8

CVSS

8.8

EPSS

0.4%

Published

Apr 15, 2023

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in a virtual-machine tool lets a program inside one virtual machine take control of the physical computer that runs it.

Exploit Available
Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Full Compromise
Component
Application
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Out-of-bounds write in virtio balloon device emulation (virtio/balloon.c and virtio/pci.c) permits a guest to corrupt host memory and achieve arbitrary code execution in the kvmtool process.

Why it matters to the business

A compromised guest can take over the host system, exposing all other guests, host data, and infrastructure to attacker control; exploit code is publicly available, increasing urgency for any environments still running the affected tool.

How an attack unfolds

An attacker with access to a guest operating system sends specially crafted virtio balloon configuration or inflate/deflate requests that trigger the out-of-bounds write in the host's virtio PCI handling, allowing control-flow hijacking and execution of attacker-chosen code on the host.

How to fix it

Upgrade kvmtool to a version containing the fix for the virtio balloon bounds check; if no maintained fixed release exists, replace kvmtool with a supported hypervisor or disable virtio balloon entirely.

How to confirm the fix worked

Confirm kvmtool binary or source is newer than the vulnerable commit 39181fc and that virtio/balloon.c contains proper length validation before PCI memory access; test by attempting balloon operations from a guest and monitoring for host crashes or unexpected writes.

Typical attack path

  1. Obtain or compromise a guest VM running under kvmtool
  2. Craft malicious virtio balloon descriptor or PCI configuration values from within the guest
  3. Trigger the balloon operation that performs the unchecked write in the host emulator
  4. Use the resulting memory corruption to overwrite function pointers or ROP chain to gain host code execution

How to detect it

Review host logs from kvmtool or the hypervisor for unexpected crashes, segmentation faults, or virtio balloon errors; inspect guest-to-host virtio traffic for anomalous balloon descriptor lengths or PCI BAR accesses; correlate with process execution of suspicious code in the kvmtool context.

What your security team should do

  • Inventory all systems using kvmtool and prioritize migration or upgrade
  • Apply host-level controls to limit guest-to-host escape impact (SELinux, seccomp, separate user namespaces)
  • Monitor for public exploit usage and block known malicious balloon request patterns at the hypervisor layer if possible

The record

kvmtool through 39181fc allows an out-of-bounds write, related to virtio/balloon.c and virtio/pci.c. This allows a guest OS user to execute arbitrary code on the host machine.

Affected packages

Ecosystem Package Introduced Fixed
Ubuntu:16.04:LTS kvmtool 0 No fix
Ubuntu:18.04:LTS kvmtool 0 No fix
Ubuntu:20.04:LTS kvmtool 0 No fix
Ubuntu:22.04:LTS kvmtool 0 No fix
Ubuntu:Pro:16.04:LTS kvmtool 0 No fix
Ubuntu:Pro:18.04:LTS kvmtool 0 No fix
Ubuntu:Pro:20.04:LTS kvmtool 0 No fix

Related vulnerabilities