-
Notifications
You must be signed in to change notification settings - Fork 281
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
make fuzzing a first class citizen in Go #154
Comments
Yes, we've found fuzzing useful in our projects multiple times. Especially sensitive code, the fuzzer will frequently find edge cases that we missed. I will say that most of the benefit is usually seen in the first tiny bit of fuzzing. There's a pretty strong diminishing returns as you continue to fuzz, at least that's what we've found. |
@DavidVorick Please post this at golang/go#19109 |
FYI here is a detailed proposal: |
I’m actively working on this. |
An update on progress: I’ve been a bit busy with the China launch so this has taken a back seat to that. I’m going to try to page this stuff back into my brain this week to get a better understanding of the code and what is required. As stated on golang/go#19109, the next step is to get go-fuzz the closest it can be to our desired API in the go command so that we can better evaluate it as a candidate in the go tool, so I’ll be working on that first. This will also help me get more familiar with what is needed if it’s integrated into the go tool. |
There are 2 things about the current go-fuzz code:
So I am thinking a good way forward can be: This is incremental plan with several milestones. We will deliver early and solve the important problems early without burring in complexities of fuzzing logic. |
Sounds good to me! |
I would advocate for a slightly different order:
Then iterate. |
One thing I would like to see in the integrated version is #65. In my experience, that is the biggest stopper for people trying to use go-fuzz. |
Re #65, agree. The current state-of-art in fuzzing seems to be moving in this direction (libfuzzer's protobuf-based mutation, syzkaller). But we again can do the most awesome support for this across other languages as:
The args can recursively include arbitrary types, including pointers, structs, slices (except for map/chan probably). Then we use reflect to capture the signature and store inputs along the lines of: |
Some time ago I appropriated @dvyukov 's Go instrumentation for usage with libFuzzer for my own needs: https://github.com/guidovranken/libfuzzer-go I now have an oss-fuzz branch ready to be merged. It now only features a basic JSON decoder but can easily be extended. Are you interested in running this on oss-fuzz? If so, I'll make a PR, and transfer ownership to you (Golang team) once it's up. If not, no hard feelings. |
There is a proposal for making fuzzing a first class citizen in Go:
golang/go#19109
First they are trying to understand if there's interest. I would appreciate if you drop a line there if you found fuzzing useful and a brief of your success story.
Thanks
The text was updated successfully, but these errors were encountered: