CVE-2024-7730
NoneCVSS
—
EPSS
0.3%
Published
Nov 14, 2024
CISA due date
—
Cloudanix analysis
A flaw in how virtual machines handle sound input could let an attacker who controls a virtual machine take over the computer running that virtual machine.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- Application
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap buffer overflow in virtio_snd_pcm_in_cb allowing out-of-bounds write when virtio queue element size matches virtio_snd_pcm_status, leaving zero space for audio data.
Why it matters to the business
Attackers with control of a guest VM could corrupt QEMU memory on the host, potentially leading to denial of service, information disclosure, or full host compromise in virtualized environments.
How an attack unfolds
An attacker controlling a guest VM configures the virtio-snd device and sends crafted audio input that triggers the input callback with a queue element sized exactly to virtio_snd_pcm_status, causing the out-of-bounds write during buffer handling.
How to fix it
Upgrade QEMU to the fixed commit fd1952d814da738ed107e05583b3e02ac11e88ff or later; rebuild and redeploy any affected virtual machine hosts or appliances using the patched version.
How to confirm the fix worked
Confirm the running QEMU binary or source tree contains commit fd1952d814da738ed107e05583b3e02ac11e88ff; test that virtio-snd audio input no longer allows oversized queue elements to bypass buffer size checks.
Typical attack path
- Gain code execution or control inside a guest VM
- Attach or configure a virtio-snd sound device
- Craft and submit audio input data via the virtio queue to hit the vulnerable callback path
- Trigger the out-of-bounds write to corrupt QEMU heap memory
- Leverage memory corruption for further exploitation such as code execution in the QEMU process
How to detect it
Review QEMU process logs and core dumps for segmentation faults or heap corruption signals during audio input operations; inspect virtio queue activity in guest-to-host communication traces for anomalous element sizes around audio callbacks.
What your security team should do
- Prioritize patching all QEMU instances exposing virtio-snd devices to external or untrusted guests
- Audit virtual machine configurations to disable unused virtio sound devices where possible
- Monitor for QEMU process crashes or unexpected memory usage patterns on hosts running affected versions
The record
A heap buffer overflow was found in the virtio-snd device in QEMU. When reading input audio in the virtio-snd input callback, virtio_snd_pcm_in_cb, the function did not check whether the iov can fit the data buffer. This issue can trigger an out-of-bounds write if the size of the virtio queue element is equal to virtio_snd_pcm_status, which makes the available space for audio data zero.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | qemu | 0 | No fix |
| Debian:12 | qemu | 0 | No fix |
| Debian:13 | qemu | 0 | 1:9.1.0+ds-1 |
| Ubuntu:20.04:LTS | qemu | 0 | 1:4.2-3ubuntu6.30 |
| Ubuntu:22.04:LTS | qemu | 0 | 1:6.2+dfsg-2ubuntu6.24 |
| Ubuntu:24.04:LTS | qemu | 0 | 1:8.2.2+ds-0ubuntu1.4 |
| Ubuntu:24.10 | qemu | 0 | 1:9.0.2+ds-4ubuntu5.1 |
| Ubuntu:Pro:14.04:LTS | qemu | 0 | 2.0.0+dfsg-2ubuntu1.47+esm4 |
| Ubuntu:Pro:16.04:LTS | qemu | 0 | 1:2.5+dfsg-5ubuntu10.51+esm3 |
| Ubuntu:Pro:18.04:LTS | qemu | 0 | 1:2.11+dfsg-1ubuntu7.42+esm2 |
Related vulnerabilities
- CVE-2024-3447 A heap-based buffer overflow was found in the SDHCI device emulation of QEMU. Also affects qemu
- CVE-2024-6519 A use-after-free vulnerability was found in the QEMU LSI53C895A SCSI Host Bus Adapter… Also affects qemu
- CVE-2024-8612 A flaw was found in QEMU, in the virtio-scsi, virtio-blk, and virtio-crypto devices. Also affects qemu
- CVE-2024-8354 A flaw was found in QEMU. Also affects qemu
- CVE-2024-7409 A flaw was found in the QEMU NBD Server. Also affects qemu
- CVE-2024-6505 A flaw was found in the virtio-net device in QEMU. Also affects qemu
- CVE-2024-4467 A flaw was found in the QEMU disk image utility (qemu-img) 'info' command. Also affects qemu
- CVE-2024-3446 A double free vulnerability was found in QEMU virtio devices (virtio-gpu… Also affects qemu