8000 Add fuzzer harnesses by isaacbrodsky · Pull Request #433 · uber/h3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add fuzzer harnesses #433

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

Merged
merged 2 commits into from
Feb 22, 2021
Merged

Add fuzzer harnesses #433

merged 2 commits into from
Feb 22, 2021

Conversation

isaacbrodsky
Copy link
Collaborator
@isaacbrodsky isaacbrodsky commented Feb 16, 2021

This pull request adds harness programs for use with the AFL fuzzer in order to detect crashes. At first, tests for geoToH3, h3ToGeo, h3ToGeoBoundary, and kRing are added.

@coveralls
Copy link
coveralls commented Feb 16, 2021

Coverage Status

Coverage remained the same at 99.315% when pulling b54879f on isaacbrodsky:afl into 3b5641f on uber:master.

Copy link
Collaborator
@nrabinowitz nrabinowitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though I'm not sure I'd be able to run the fuzzers based on the docs w/o a fair amount of trial and error.

An individual fuzzer run is invoked as follows. The argument is a file containing the number of bytes needed.

```
fuzzerGeoToH3 bytes24
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused by the file arguments here. Are these files we could check into the repo?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't they invoked by the new fuzzer test commands with random data over and over again in the attempt to cause breakage?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is an example of how to test the fuzzer program (check that it does what you think it does) before putting it through AFL. I didn't check in the initial files (like bytes24) because they had no useful content - they were just ASCII '0' repeated a given number of times and then I had the fuzzer permute from that. I could add either a script that sets up the file or check in a binary file of the right size to make it easier to start the fuzzer.

@isaacbrodsky isaacbrodsky merged commit a4fda8e into uber:master Feb 22, 2021
@isaacbrodsky isaacbrodsky deleted the afl branch February 22, 2021 05:41
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

Successfully merging this pull request may close these issues.

4 participants
0