Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature proposal: FuzzBench aware fuzzers #831

Open
andreafioraldi opened this issue Oct 14, 2020 · 1 comment
Open

Feature proposal: FuzzBench aware fuzzers #831

andreafioraldi opened this issue Oct 14, 2020 · 1 comment
Assignees

Comments

@andreafioraldi
Copy link
Contributor

andreafioraldi commented Oct 14, 2020

Would be cool to have an API that fuzzers can use to report stats to FuzzBench.
Fuzzers should modify their code to enable more insightful evaluations (like https://hexgolems.com/2020/08/on-measuring-and-visualizing-fuzzer-performance/) like coverage per generated testcase or even execs/sec to evaluate performance.

So FuzzBench will produce two types of experiments, the generic (like now) that works with off-the-shelf fuzzers, and the FuzzBench aware evaluation with only the fuzzers that implements the FuzzBench API.

You can for instance set an env variable like FUZZBENCH_LIB=path/to that defines the path to the C library with such API and then we (fuzzers devs) can adjust the build systems to link such lib and enable the code that does the logging for fuzzbench using the preprocessor.

In AFL, for instance, we can insert snipperts like the following (from https://github.com/google/AFL/blob/master/afl-fuzz.c#L4650):

#ifdef FUZZBENCH_BUILD
#include "fuzzbench.h"
#endif

EXP_ST u8 common_fuzz_stuff(char** argv, u8* out_buf, u32 len) {

  u8 fault;

#ifdef FUZZBENCH_BUILD
  fuzzbench_log_testcase(out_buf, len);
#endif 

  ...

}
@inferno-chromium
Copy link
Collaborator

Please also check current cl - #648 and provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants