fuzz: Add fuzzer for virtio-net

To synthesize the interactions between the virtio-net device and the tap
interface, the fuzzer utilizes a pair of unix domain sockets: one socket
(e.g. the dummy tap frontend) is used to construct the 'net_util::Tap'
instance for creating a virtio-net device; the other socket (e.g. the
dummy tap backend) is used in a epoll loop for handling the tx and rx
requests from the virtio-net device.

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2022-11-23 15:23:00 -08:00
committed by Rob Bradford
parent ec94ae31ee
commit e2e02c8f69
3 changed files with 290 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ epoll = "4.3.1"
libc = "0.2.135"
libfuzzer-sys = "0.4.5"
micro_http = { git = "https://github.com/firecracker-microvm/micro-http", branch = "main" }
net_util = { path = "../net_util" }
once_cell = "1.16.0"
qcow = { path = "../qcow" }
seccompiler = "0.3.0"
@@ -80,6 +81,12 @@ path = "fuzz_targets/mem.rs"
test = false
doc = false
[[bin]]
name = "net"
path = "fuzz_targets/net.rs"
test = false
doc = false
[[bin]]
name = "pmem"
path = "fuzz_targets/pmem.rs"