[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V4 08/10] pcnet: switch to use qemu_receive_packet() for loopback
From: |
Jason Wang |
Subject: |
[PATCH V4 08/10] pcnet: switch to use qemu_receive_packet() for loopback |
Date: |
Fri, 5 Mar 2021 14:26:36 +0800 |
From: Alexander Bulekov <alxndr@bu.edu>
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>
Buglink: https://bugs.launchpad.net/qemu/+bug/1917085
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/net/pcnet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c
index f3f18d8598..dcd3fc4948 100644
--- a/hw/net/pcnet.c
+++ b/hw/net/pcnet.c
@@ -1250,7 +1250,7 @@ txagain:
if (BCR_SWSTYLE(s) == 1)
add_crc = !GET_FIELD(tmd.status, TMDS, NOFCS);
s->looptest = add_crc ? PCNET_LOOPTEST_CRC : PCNET_LOOPTEST_NOCRC;
- pcnet_receive(qemu_get_queue(s->nic), s->buffer, s->xmit_pos);
+ qemu_receive_packet(qemu_get_queue(s->nic), s->buffer,
s->xmit_pos);
s->looptest = 0;
} else {
if (s->nic) {
--
2.24.3 (Apple Git-128)
- [PATCH V4 00/10] Detect reentrant RX casued by loopback, Jason Wang, 2021/03/05
- [PATCH V4 01/10] net: introduce qemu_receive_packet(), Jason Wang, 2021/03/05
- [PATCH V4 02/10] e1000: switch to use qemu_receive_packet() for loopback, Jason Wang, 2021/03/05
- [PATCH V4 03/10] dp8393x: switch to use qemu_receive_packet() for loopback packet, Jason Wang, 2021/03/05
- [PATCH V4 04/10] msf2-mac: switch to use qemu_receive_packet() for loopback, Jason Wang, 2021/03/05
- [PATCH V4 05/10] sungem: switch to use qemu_receive_packet() for loopback, Jason Wang, 2021/03/05
- [PATCH V4 06/10] tx_pkt: switch to use qemu_receive_packet_iov() for loopback, Jason Wang, 2021/03/05
- [PATCH V4 07/10] rtl8139: switch to use qemu_receive_packet() for loopback, Jason Wang, 2021/03/05
- [PATCH V4 08/10] pcnet: switch to use qemu_receive_packet() for loopback,
Jason Wang <=
- [PATCH V4 09/10] cadence_gem: switch to use qemu_receive_packet() for loopback, Jason Wang, 2021/03/05
- [PATCH V4 10/10] lan9118: switch to use qemu_receive_packet() for loopback, Jason Wang, 2021/03/05
- Re: [QEMU-SECURITY] [PATCH V4 00/10] Detect reentrant RX casued by loopback, P J P, 2021/03/05
- Re: [PATCH V4 00/10] Detect reentrant RX casued by loopback, Philippe Mathieu-Daudé, 2021/03/05
- Re: [PATCH V4 00/10] Detect reentrant RX casued by loopback, Jason Wang, 2021/03/07