CVE-2021-3713

7.4 HIGH

📋 TL;DR

This vulnerability allows a malicious guest user in QEMU virtual machines to perform out-of-bounds writes in the UAS device emulation, potentially leading to QEMU process crashes or arbitrary code execution on the host system. It affects QEMU versions prior to 6.2.0-rc0 when UAS device emulation is enabled. Organizations using QEMU for virtualization with USB Attached SCSI device support are at risk.

💻 Affected Systems

Products:
  • QEMU
Versions: All versions prior to 6.2.0-rc0
Operating Systems: Linux, Windows, macOS - any OS running vulnerable QEMU versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when UAS (USB Attached SCSI) device emulation is enabled. Many default configurations may not have this feature enabled.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Privileged code execution on the host system, potentially leading to full host compromise and lateral movement to other virtual machines or systems.

🟠

Likely Case

QEMU process crash causing denial of service for affected virtual machines, requiring host intervention to restart VMs.

🟢

If Mitigated

Limited impact with proper network segmentation and minimal privileges for QEMU processes, potentially only affecting isolated virtual machines.

🌐 Internet-Facing: LOW - This vulnerability requires guest VM access and is not directly exploitable over the internet unless combined with other vulnerabilities.
🏢 Internal Only: MEDIUM - Malicious or compromised guest VMs could exploit this to affect the host system or other VMs on the same hypervisor.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires guest VM access and knowledge of the vulnerability. The guest must have ability to interact with UAS device emulation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 6.2.0-rc0 and later

Vendor Advisory: https://bugzilla.redhat.com/show_bug.cgi?id=1994640

Restart Required: Yes

Instructions:

1. Update QEMU to version 6.2.0-rc0 or later. 2. Restart all QEMU processes and affected virtual machines. 3. Verify the update was successful by checking QEMU version.

🔧 Temporary Workarounds

Disable UAS device emulation

all

Remove or disable USB Attached SCSI device support in QEMU configuration

Edit QEMU configuration to remove '-device usb-storage' or similar UAS-related options

Restrict guest VM privileges

linux

Run QEMU with reduced privileges and implement strict access controls

Run QEMU as non-root user, implement SELinux/AppArmor policies

🧯 If You Can't Patch

  • Disable UAS device emulation in all QEMU configurations
  • Implement network segmentation to isolate vulnerable VMs from critical systems

🔍 How to Verify

Check if Vulnerable:

Check QEMU version with 'qemu-system-x86_64 --version' or equivalent for your architecture. If version is earlier than 6.2.0-rc0 and UAS device emulation is enabled, the system is vulnerable.

Check Version:

qemu-system-x86_64 --version | head -1

Verify Fix Applied:

Verify QEMU version is 6.2.0-rc0 or later and check that UAS device emulation is properly configured if needed.

📡 Detection & Monitoring

Log Indicators:

  • QEMU process crashes with segmentation faults
  • Unexpected QEMU termination logs
  • Guest VM access attempts to UAS device interfaces

Network Indicators:

  • Unusual USB device emulation traffic from guest VMs

SIEM Query:

source="qemu.log" AND ("segmentation fault" OR "crash" OR "uas")

🔗 References

📤 Share & Export