Bug 2254580 (CVE-2023-6693) - CVE-2023-6693 QEMU: virtio-net: stack buffer overflow in virtio_net_flush_tx()
Summary: CVE-2023-6693 QEMU: virtio-net: stack buffer overflow in virtio_net_flush_tx()
Keywords:
Status: NEW
Alias: CVE-2023-6693
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2256436
Blocks: 2254047
TreeView+ depends on / blocked
 
Reported: 2023-12-14 16:55 UTC by Mauro Matteo Cascella
Modified: 2024-05-22 09:22 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A stack based buffer overflow was found in the virtio-net device of QEMU. This issue occurs 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. This could allow a malicious user to overwrite local variables allocated on the stack. Specifically, the `out_sg` variable could be used to read a part of process memory and send it to the wire, causing an information leak.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2024:2962 0 None None None 2024-05-22 09:22:27 UTC

Description Mauro Matteo Cascella 2023-12-14 16:55:45 UTC
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);

Comment 4 Mauro Matteo Cascella 2024-01-02 08:59:55 UTC
Created qemu tracking bugs for this issue:

Affects: fedora-all [bug 2256436]

Comment 8 errata-xmlrpc 2024-05-22 09:22:25 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:2962 https://access.redhat.com/errata/RHSA-2024:2962


Note You need to log in before you can comment on or make changes to this bug.