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

fuzz with afl? #1

Open
dgryski opened this issue Mar 22, 2018 · 3 comments
Open

fuzz with afl? #1

dgryski opened this issue Mar 22, 2018 · 3 comments

Comments

@dgryski
Copy link

dgryski commented Mar 22, 2018

Were you planning on writing some code to fuzz the decoder with http://lcamtuf.coredump.cx/afl/ ?

@gonzus
Copy link
Owner

gonzus commented Mar 22, 2018 via email

@dgryski
Copy link
Author

dgryski commented Mar 22, 2018

Here's one for libfuzzer that ships with clang:

#include <stdint.h>
#include <stddef.h>
#include "olc.h"

int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
  OLC_CodeArea area;
  OLC_Decode((const char*)Data, &area);
  return 0;
}

Then

$ clang -g -fsanitize=fuzzer,address fuzz.c olc.c
$ ./a.out

and wait..

@gonzus
Copy link
Owner

gonzus commented Mar 23, 2018

This is awesome, thanks for pointing it out to me. I have modified the public API to allow for fixing all the bugs discovered by fuzzing; fuck it, this is a real improvement. Thanks!

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

2 participants