While fuzzing virtio-net I found that attempting to send a zero-size packet leads to an assertion failure, when resetting the device. These patches add an assertion to net/net.c to ensure that virtual devices do not try to send zero-size packets and change virtio-net to check that packets have non-zero size, prior to sending.
Alexander Oleinik (2): net: assert that tx packets have nonzero size virtio-net: check that tx packet has positive size hw/net/virtio-net.c | 15 +++++++++------ net/net.c | 3 +++ 2 files changed, 12 insertions(+), 6 deletions(-) -- 2.20.1