-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add instructions on how to fuzz #2992
Conversation
@personnumber3377 Does this work for you? |
da696bb
to
cd5455a
Compare
Hi @hrxi ! I don't think that works, because you must enable the "fuzz" feature. See the source code in
This line here: I also added some more fuzzers for example I added a fuzzer which fuzzes keypairs and contracts, but I am yet to find any bugs. I attached the source code to these fuzzers in Edit: Yeah, I just confirmed that the |
cd5455a
to
8f2bba8
Compare
Thanks for noticing the missing Thanks for writing additional fuzzers. Do you want to create a PR for them? Or would you like me to do that for you? |
Hi @hrxi ! Sorry for the late reply. I created a pull request here: #3003 . I cleaned up some of my code. It should add a couple of more fuzzers for the source code. Also I have this idea of doing a "round trip" fuzzers, which first deserializes a vector and then serializes the object back into a vector and then checks if the contents of those two vectors are the same. If they aren't then there is a bug, because serializing and deserializing should be inverse operations. I haven't gotten around to implementing these yet. Edit: Maybe something like this?
|
This seems to work:
That compiles, but doesn't fuzz correctly, since there is this comment:
in
Are interpreted as crashes. I think this can be solved by "clipping" the longer matrix of the two to the same length as the shorter one. This makes the comparison valid. This seems to work:
I added these changes in this commit: 8ab70ba on my own fork. Of course the code needs a bit of cleanup but that is the basic premise. Then that just needs to be implemented for the other types. Also if I find such a "round trip" vulnerability, is that vulnerability applicable to your bug bounty program? |
I actually think that it is just easier to compare the objects instead of the bytearrays like so:
That seems like a lot smarter solution to the "round-trip" fuzzer than what I was doing before. |
Rebasing branch to merge it |
8f2bba8
to
e4e2b9e
Compare
Fixes #2990.