summaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorJason Wang2021-02-24 04:44:36 +0100
committerJason Wang2021-03-15 09:41:22 +0100
commit705df5466c98f3efdd2b68d3b31dad86858acad7 (patch)
treef07da22288195fe5fb2a9aa912d082ad3056bb47 /net/socket.c
parente1000: fail early for evil descriptor (diff)
downloadqemu-705df5466c98f3efdd2b68d3b31dad86858acad7.tar.gz
qemu-705df5466c98f3efdd2b68d3b31dad86858acad7.tar.xz
qemu-705df5466c98f3efdd2b68d3b31dad86858acad7.zip
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>
Diffstat (limited to 'net/socket.c')
0 files changed, 0 insertions, 0 deletions