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

afl fuzz tests #270

Closed
danburkert opened this issue Jan 16, 2020 · 4 comments · Fixed by #272
Closed

afl fuzz tests #270

danburkert opened this issue Jan 16, 2020 · 4 comments · Fixed by #272

Comments

@danburkert
Copy link
Collaborator

danburkert commented Jan 16, 2020

#267 shows that the current in-tree fuzzing based on cargo-fuzz has some blindspots. Investigate adding afl-based fuzzing to the in-tree test suite.

@dbrgn
Copy link
Contributor

dbrgn commented Jan 16, 2020

I could probably contribute something!

Do you already have a "sample language" somewhere? Ideally with a common root message, so that all code paths can be discovered from the same parse entry point.

@danburkert
Copy link
Collaborator Author

Yes, see the existing cargo-fuzz tests in https:/danburkert/prost/tree/master/fuzz, and which use https:/danburkert/prost/blob/master/tests/src/lib.rs#L117-L170 as the success checker.

@danburkert
Copy link
Collaborator Author

danburkert commented Jan 17, 2020

@dbrgn more of a point of curiosity than anything, how long did you have to run afl to produce the stack overflow?

@dbrgn
Copy link
Contributor

dbrgn commented Jan 17, 2020

It was only a few minutes on a single core 🙂 Not sure if I just got lucky.

I was fuzzing a separate project where most (but not all) messages are just a single prefix byte, followed by a protobuf message. I quickly got about half a dozen failures, which were all related to the stack overflow.

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

Successfully merging a pull request may close this issue.

2 participants