mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
rtl8139: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <[email protected]> Cc: [email protected] Buglink: https://bugs.launchpad.net/qemu/+bug/1910826 Reviewed-by: Philippe Mathieu-Daudé <[email protected] Signed-off-by: Alexander Bulekov <[email protected]> Signed-off-by: Jason Wang <[email protected]>
This commit is contained in:
1 parent
8c552542b8
commit
5311fb805a
1 file changed
+1
-1
+1
-1
@@ -1795,7 +1795,7 @@ static void rtl8139_transfer_frame(RTL8139State *s, uint8_t *buf, int size,
|
||||
}
|
||||
|
||||
DPRINTF("+++ transmit loopback mode\n");
|
||||
rtl8139_do_receive(qemu_get_queue(s->nic), buf, size, do_interrupt);
|
||||
qemu_receive_packet(qemu_get_queue(s->nic), buf, size);
|
||||
|
||||
if (iov) {
|
||||
g_free(buf2);
|
||||
|
||||
Reference in new issue
Block a user