]> git.ipfire.org Git - thirdparty/qemu.git/commit
net: Update MemReentrancyGuard for NIC
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Thu, 1 Jun 2023 03:18:59 +0000 (12:18 +0900)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 29 Nov 2023 12:35:38 +0000 (15:35 +0300)
commit88e79a2dfda319f9ebec2cc8a5c3c9733716d13f
tree594814caa172251bbd884324fcc2b6e87ef6a49a
parentcc5124d9797b0801525bc6658af9ed22426d1eff
net: Update MemReentrancyGuard for NIC

Recently MemReentrancyGuard was added to DeviceState to record that the
device is engaging in I/O. The network device backend needs to update it
when delivering a packet to a device.

This implementation follows what bottom half does, but it does not add
a tracepoint for the case that the network device backend started
delivering a packet to a device which is already engaging in I/O. This
is because such reentrancy frequently happens for
qemu_flush_queued_packets() and is insignificant.

Fixes: CVE-2023-3019
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Acked-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit 9050f976e447444ea6ee2ba12c9f77e4b0dc54bc)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
include/net/net.h
net/net.c