sungem: switch to use qemu_receive_packet() for loopback
commit8c92060d3c0248bd4d515719a35922cd2391b9b4
authorJason Wang <jasowang@redhat.com>
Wed, 24 Feb 2021 05:14:35 +0000 (24 13:14 +0800)
committerJason Wang <jasowang@redhat.com>
Mon, 15 Mar 2021 08:41:22 +0000 (15 16:41 +0800)
tree3baff0d2569343e238e12241dcb92708c7a45f8c
parent26194a58f4eb83c5bdf4061a1628508084450ba1
sungem: 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 <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/sungem.c