[Libguestfs] [PATCH nbdkit 0/2] Implement fuzzing using Clang's libFuzzer.

Richard W.M. Jones
2019-11-02T21:23:32Z

libFuzzer is Clang's fuzzer, and alternative to using AFL:

  https://llvm.org/docs/LibFuzzer.html

I implemented an alternative method of fuzzing for libnbd earlier
today and it's pretty simple:


https://github.com/libguestfs/libnbd/commit/c19a6fbae9a21a7d4693418706c59e81ed256875

However it's considerably more difficult to use libFuzzer with
non-library code -- in this case nbdkit.

I think the first patch in this series has some merit on its own.  The
second patch does a lot of pretty ugly stuff to turn nbdkit into a
long-running process as required by libFuzzer.

It does kind of work, although it leaks a few MB of memory for each
minute that you run the fuzzer which is less than ideal.

Rich.