Jason Wang 705df5466c net: introduce qemu_receive_packet()
Some NIC supports loopback mode and this is done by calling
nc->info->receive() directly which in fact suppresses the effort of
reentrancy check that is done in qemu_net_queue_send().

Unfortunately we can't use qemu_net_queue_send() here since for
loopback there's no sender as peer, so this patch introduce a
qemu_receive_packet() which is used for implementing loopback mode
for a NIC with this check.

NIC that supports loopback mode will be converted to this helper.

This is intended to address CVE-2021-3416.

Cc: Prasad J Pandit <ppandit@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
2021-03-15 16:41:22 +08:00
..
2020-12-15 10:02:07 -05:00
2020-12-15 10:02:07 -05:00
2020-12-15 10:02:07 -05:00
2021-03-15 16:41:22 +08:00
2019-08-16 13:31:52 +02:00
2021-03-15 16:41:22 +08:00
2016-02-04 17:41:30 +00:00
2019-01-14 00:44:29 +01:00