First published: Thu Dec 14 2023(Updated: )
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 virtio_net_hdr_mrg_rxbuf, when flushing TX in the virtio_net_flush_tx function. If guest features VIRTIO_NET_F_HASH_REPORT, VIRTIO_F_VERSION_1 and VIRTIO_NET_F_MRG_RXBUF are enabled, `n->guest_hdr_len` is set to sizeof(struct virtio_net_hdr_v1_hash), which is bigger than sizeof(virtio_net_hdr_mrg_rxbuf). This vulnerability could potentially allow a malicious user to overwrite local variables adjacent to mhdr allocated on the stack. Specifically, the out_sg variable could be used to read some part of process memory and send it to the wire: ret = qemu_sendv_packet_async(qemu_get_subqueue(n->nic, queue_index), out_sg, out_num, virtio_net_tx_complete);
Affected Software | Affected Version | How to fix |
---|---|---|
QEMU |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The severity of REDHAT-BUG-2254580 is considered critical due to the potential for remote code execution through stack-based buffer overflow.
To fix REDHAT-BUG-2254580, update the QEMU package to the latest version that has addressed this vulnerability.
The systems affected by REDHAT-BUG-2254580 include any installations of QEMU that utilize the virtio-net device with specific guest features enabled.
The vulnerability in REDHAT-BUG-2254580 is caused by a stack-based buffer overflow occurring in the virtio_net_flush_tx function when handling certain guest features.
Yes, a possible workaround for REDHAT-BUG-2254580 is to disable the affected features on the virtio-net device if feasible.