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

testing: support custom dictionaries in fuzzer #46508

Open
rolandshoemaker opened this issue Jun 2, 2021 · 0 comments
Open

testing: support custom dictionaries in fuzzer #46508

rolandshoemaker opened this issue Jun 2, 2021 · 0 comments
Labels
FeatureRequest fuzz Issues related to native fuzzing support NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@rolandshoemaker
Copy link
Member

#46507 suggests multiple strategies which make use of automatically generated dictionaries of interesting values. It is likely also valuable to allow users to generate their own dictionaries of interesting values, as is supported by AFL and libFuzzer, that the mutation engine can pull from.

The easiest solution for encoding the values is likely to use a similar encoding scheme to AFL and libFuzzer, so existing dictionaries can be easily reused. Both use quoted strings with \x byte encoding, e.g.:

"blah"
"\"ac\\dc\""
"\xF7\xF8"
"foo\x0Abar"

AFL and libFuzzer support prefixing these values with a keyword (i.e. name="blah"), but do not use the name for anything. It seems reasonable to support this, so dictionaries can be directly imported, but to just ignore these values. Lines prefixed with # are ignored.

These dictionaries could be consumed from the testdata folder, similarly to the testdata/corpus seed inputs, and by extending the testing.F API with something like func (f *F) AddDictionaryEntry([]byte).

@rolandshoemaker rolandshoemaker added the fuzz Issues related to native fuzzing support label Jun 2, 2021
@dr2chase dr2chase added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 4, 2021
@katiehockman katiehockman added this to the Backlog milestone Sep 14, 2021
@rsc rsc changed the title [dev.fuzz] testing: support custom dictionaries testing: support custom dictionaries in fuzzer Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest fuzz Issues related to native fuzzing support NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: No status
Development

No branches or pull requests

3 participants