Skip to content
Snippets Groups Projects
  • Jason Wang's avatar
    705df546
    net: introduce qemu_receive_packet() · 705df546
    Jason Wang authored
    
    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: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
    Cc: qemu-stable@nongnu.org
    Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
    705df546
    History
    net: introduce qemu_receive_packet()
    Jason Wang authored
    
    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: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
    Cc: qemu-stable@nongnu.org
    Signed-off-by: default avatarJason Wang <jasowang@redhat.com>