First published: Tue Aug 03 2021(Updated: )
A flaw was found in the USB redirector device (usb-redir) of QEMU. It occurs when dropping packets during a bulk transfer from a SPICE client due to the packet queue being full. More specifically, the usbredir_buffered_bulk_packet() function calls bufp_alloc() with an invalid pointer that points into the middle of a buffer controlled by the SPICE client. If the packet queue is full, bufp_alloc() ends up freeing the same pointer passed as argument. A malicious SPICE client could use this flaw to make QEMU call free() with faked heap chunk metadata, resulting in a crash of QEMU or potential code execution with the privileges of the QEMU process on the host. Upstream issue: <a href="https://gitlab.com/qemu-project/qemu/-/issues/491">https://gitlab.com/qemu-project/qemu/-/issues/491</a> Upstream fix: <a href="https://gitlab.com/qemu-project/qemu/-/commit/5e796671e6b8d5de4b0b423dce1b3eba144a92c9">https://gitlab.com/qemu-project/qemu/-/commit/5e796671e6b8d5de4b0b423dce1b3eba144a92c9</a>
Credit: secalert@redhat.com
Affected Software | Affected Version | How to fix |
---|---|---|
debian/qemu | <=1:3.1+dfsg-8+deb10u8<=1:5.2+dfsg-11<=1:3.1+dfsg-8 | 1:6.0+dfsg-3 1:5.2+dfsg-11+deb11u1 |
redhat/qemu | <6.1.0 | 6.1.0 |
QEMU KVM | <6.1.0 | |
QEMU KVM | =6.1.0-rc1 | |
Red Hat Enterprise Linux | =8.0 | |
Red Hat Enterprise Linux | =8.0 | |
Debian GNU/Linux | =9.0 | |
Debian GNU/Linux | =10.0 | |
Debian GNU/Linux | =11.0 | |
debian/qemu | 1:5.2+dfsg-11+deb11u3 1:5.2+dfsg-11+deb11u2 1:7.2+dfsg-7+deb12u12 1:9.2.0+ds-5 1:9.2.1+ds-1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2021-3682 is a vulnerability in the USB redirector device emulation of QEMU.
CVE-2021-3682 has a severity score of 8.5, which is considered high.
Versions prior to 6.1.0-rc2 of QEMU are affected by CVE-2021-3682.
To fix CVE-2021-3682, update QEMU to version 6.1.0 or later.
You can find more information about CVE-2021-3682 at the following references: [Link 1](https://gitlab.com/qemu-project/qemu/-/issues/491), [Link 2](https://gitlab.com/qemu-project/qemu/-/commit/5e796671e6b8d5de4b0b423dce1b3eba144a92c9), [Link 3](https://gitlab.com/qemu-project/qemu/-/commit/b2d1fe67d09d2b6c7da647fbcea6ca0148c206d3).