mirror_qemu/net
Akihiko Odaki 88e79a2dfd 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 9050f976e4)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2023-11-29 15:35:38 +03:00
..
can meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
announce.c qapi net: Elide redundant has_FOO in generated C 2022-12-14 20:04:47 +01:00
checksum.c net/checksum: Remove unused variable in net_checksum_add_iov 2021-07-26 07:06:58 -10:00
clients.h qapi: net: add stream and dgram netdevs 2022-10-28 13:28:52 +08:00
colo-compare.c qapi: Use returned bool to check for failure (again) 2022-12-14 16:19:35 +01:00
colo-compare.h Add the function of colo_compare_cleanup 2021-06-11 10:30:13 +08:00
colo.c net/colo.c: Fix the pointer issue reported by Coverity. 2022-09-02 10:22:39 +08:00
colo.h net/colo.c: Fix the pointer issue reported by Coverity. 2022-09-02 10:22:39 +08:00
dgram.c win32: replace closesocket() with close() wrapper 2023-03-13 15:39:31 +04:00
dump.c net: Strip virtio-net header when dumping 2023-03-10 15:35:38 +08:00
eth.c igb: Strip the second VLAN tag for extended VLAN 2023-05-23 15:20:15 +08:00
filter-buffer.c netfilter: Use class properties 2020-12-15 10:02:07 -05:00
filter-mirror.c net/filter: Optimize filter_send to coroutine 2022-02-14 11:50:44 +08:00
filter-replay.c hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
filter-rewriter.c net/colo: Fix a "double free" crash to clear the conn_list 2022-07-20 16:58:08 +08:00
filter.c netfilter: Use class properties 2020-12-15 10:02:07 -05:00
hub.c qapi net: Elide redundant has_FOO in generated C 2022-12-14 20:04:47 +01:00
hub.h net: Remove deprecated [hub_id name] tuple of 'hostfwd_add' / 'hostfwd_remove' 2020-03-09 18:44:04 +00:00
l2tpv3.c net: Increase L2TPv3 buffer to fit jumboframes 2023-02-17 13:31:33 +08:00
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
net-hmp-cmds.c net: Move hmp_info_network() to net-hmp-cmds.c 2023-02-04 07:56:54 +01:00
net.c net: Update MemReentrancyGuard for NIC 2023-11-29 15:35:38 +03:00
netmap.c Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
queue.c net: introduce qemu_receive_packet() 2021-03-15 16:41:22 +08:00
slirp.c slirp: open-code qemu_socket_(un)select() 2023-03-13 15:39:31 +04:00
socket.c net: socket: remove net_init_socket() 2023-07-07 16:35:12 +08:00
stream.c net: stream: add a new option to automatically reconnect 2023-02-17 13:31:33 +08:00
tap-bsd.c Refactoring: refactor TFR() macro to RETRY_ON_EINTR() 2023-01-09 13:50:47 +01:00
tap-linux.c Refactoring: refactor TFR() macro to RETRY_ON_EINTR() 2023-01-09 13:50:47 +01:00
tap-linux.h net: Replace TAB indentations with spaces 2022-11-11 09:39:03 +01:00
tap-solaris.c Refactoring: refactor TFR() macro to RETRY_ON_EINTR() 2023-01-09 13:50:47 +01:00
tap-stub.c net: Added SetSteeringEBPF method for NetClientState. 2021-06-04 15:25:46 +08:00
tap-win32.c qapi net: Elide redundant has_FOO in generated C 2022-12-14 20:04:47 +01:00
tap.c net: Strip virtio-net header when dumping 2023-03-10 15:35:38 +08:00
tap_int.h net: Added SetSteeringEBPF method for NetClientState. 2021-06-04 15:25:46 +08:00
trace-events net/colo.c: Fix the pointer issue reported by Coverity. 2022-09-02 10:22:39 +08:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
util.c net: Clean up includes 2016-02-04 17:41:30 +00:00
util.h Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
vde.c net: introduce qemu_set_info_str() function 2022-10-28 13:28:52 +08:00
vhost-user-stub.c vhost-net-user: add stubs for when no virtio-net device is present 2019-02-21 12:28:01 -05:00
vhost-user.c vhost-user: Refactor the chr_closed_bh 2023-01-08 01:54:22 -05:00
vhost-vdpa-stub.c vhost-net-vdpa: add stubs for when no virtio-net device is present 2022-07-20 16:58:08 +08:00
vhost-vdpa.c vdpa net: follow VirtIO initialization properly at cvq isolation probing 2023-10-06 15:35:44 +03:00
vmnet-bridged.m cocoa: Fix warnings about invalid prototype declarations 2023-06-13 11:28:58 +02:00
vmnet-common.m vmnet: stop recieving events when VM is stopped 2023-02-17 13:31:33 +08:00
vmnet-host.c qapi net: Elide redundant has_FOO in generated C 2022-12-14 20:04:47 +01:00
vmnet-shared.c qapi net: Elide redundant has_FOO in generated C 2022-12-14 20:04:47 +01:00
vmnet_int.h vmnet: stop recieving events when VM is stopped 2023-02-17 13:31:33 +08:00