CVE-2023-6693: Qemu: virtio-net: stack buffer overflow in virtio_net_flush_tx()
A stack based buffer overflow was found in the virtio-net device of QEMU. The flaw occurs while copying data to mhdr, a local variable of type virtionethdrmrgrxbuf, when flushing TX in the virtionetflushtx function. If guest features VIRTIONETFHASHREPORT, VIRTIOFVERSION1 and VIRTIONETFMRGRXBUF are enabled, n->guesthdrlen is set to sizeof(struct virtionethdrv1hash), which is bigger than sizeof(virtionethdrmrgrxbuf). This vulnerability could potentially allow a malicious user to overwrite local variables adjacent to mhdr allocated on the stack. Specifically, the outsg variable could be used to read some part of process memory and send it to the wire:
ret = qemusendvpacketasync(qemugetsubqueue(n->nic, queueindex), outsg, outnum, virtionettxcomplete);
Other sources
A stack based buffer overflow was found in the virtio-net device of QEMU. This issue occurs when flushing TX in the virtionetflushtx function if guest features VIRTIONETFHASHREPORT, VIRTIOFVERSION1 and VIRTIONETFMRGRXBUF are enabled. This could allow a malicious user to overwrite local variables allocated on the stack. Specifically, the outsg variable could be used to read a part of process memory and send it to the wire, causing an information leak.
— Launchpad
Qemu: virtio-net: stack buffer overflow in virtionetflushtx()
— Microsoft
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2023-6693?
CVE-2023-6693 is categorized as a critical vulnerability due to the potential for a stack-based buffer overflow.
How do I fix CVE-2023-6693?
To mitigate CVE-2023-6693, upgrade QEMU to versions 1:7.2+dfsg-7+deb12u7, 1:9.0.2+ds-2, or 1:9.1.0+ds-3.
What versions of QEMU are affected by CVE-2023-6693?
CVE-2023-6693 affects QEMU versions up to 8.2.1 and from 1:5.2+dfsg-11+deb11u3, down to 1:5.2+dfsg-11+deb11u2.
Which distributions are impacted by CVE-2023-6693?
CVE-2023-6693 impacts QEMU installations on Debian, Red Hat Enterprise Linux, and Fedora systems.
What is the nature of the vulnerability in CVE-2023-6693?
The nature of CVE-2023-6693 is a stack-based buffer overflow that occurs during the data copying process in the virtio-net device.