fuzz: virtio: Add fuzzer for vring
authorAndrew Scull <ascull@google.com>
Mon, 30 May 2022 10:00:13 +0000 (10:00 +0000)
committerTom Rini <trini@konsulko.com>
Thu, 23 Jun 2022 16:58:19 +0000 (12:58 -0400)
commita73f3ba91f15e08d6a7ec8cf0408aed517d22bb1
tree7a942f93d9884d9c1fd7b905c1a2078f8207d18b
parent0518e7a28fdbaf27cda7a43d1a52d457536e1d9b
fuzz: virtio: Add fuzzer for vring

Add a fuzzer to test the vring handling code against unexpected
mutations from the virtio device.

After building the sandbox with CONFIG_FUZZ=y, the fuzzer can be invoked
with by:

   UBOOT_SB_FUZZ_TEST=fuzz_vring ./u-boot

This fuzzer finds unvalidated inputs in the vring driver that allow a
buggy or malicious device to make the driver chase wild pointers.

Signed-off-by: Andrew Scull <ascull@google.com>
test/fuzz/Makefile
test/fuzz/virtio.c [new file with mode: 0644]