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

tests/fuzzers: add snap protocol handling fuzzer #23957

Merged
merged 1 commit into from Dec 1, 2021

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Nov 23, 2021

This is the fuzzer that found the second vulnerability in the snap handler (GHSA-59hh-656j-3p7v).


func doFuzz(input []byte, obj interface{}, code int) int {
if len(input) > 1024*4 {
return 1
Copy link
Member

Choose a reason for hiding this comment

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

Don't we want to return -1 here to make sure the fuzzer does not create inputs that are too long?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, or zero, good catch!

Copy link
Member

@MariusVanDerWijden MariusVanDerWijden left a comment

Choose a reason for hiding this comment

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

LGTM, just tiny nitpicks

@holiman holiman merged commit 1988b47 into ethereum:master Dec 1, 2021
@holiman holiman added this to the 1.10.14 milestone Dec 1, 2021
JacekGlen pushed a commit to JacekGlen/go-ethereum that referenced this pull request May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants