freenode
Databases & Infrastructure

QEMU USB storage reset bug let guests overflow the host heap

CVE-2026-121860 left SCSI requests running across a Bulk-Only Transport reset, so a guest could overwrite up to about 124 KiB of QEMU memory.

A flaw in QEMU's emulated USB mass storage let a guest corrupt the host process heap. CVE-2026-121860 is a heap buffer overflow of up to about 124 KiB on data-out transfers, triggered through the Bulk-Only Transport reset path.

The class-specific Mass Storage Reset only put the device back into a state ready for the next command block wrapper. It did not cancel SCSI requests already in flight. A later command replaced the stored request without dropping the old one, so a late completion used a leftover transfer length against a smaller buffer the guest had just supplied.

Tommaso Califano fixed it by sending that class reset through the device's existing reset handler instead of flipping the state by hand. The same path clears the flag that otherwise stuck the device after a fatal error, so a guest can recover without a full port reset. Califano wrote that the change matches the USB Mass Storage Class Bulk-Only Transport specification. The fix is marked for QEMU's stable trees.