Skip to content

clarify that afl fuzz inputs are necessary and link to how to craft them#51

Merged
smoelius merged 2 commits intorust-fuzz:masterfrom
cosmicexplorer:clarify-fuzz-inputs
Sep 30, 2025
Merged

clarify that afl fuzz inputs are necessary and link to how to craft them#51
smoelius merged 2 commits intorust-fuzz:masterfrom
cosmicexplorer:clarify-fuzz-inputs

Conversation

@cosmicexplorer
Copy link
Copy Markdown
Contributor

@cosmicexplorer cosmicexplorer commented Sep 30, 2025

Problem

  • The book states that example inputs to AFL are not strictly required, which seems to be flatly false. I was not immediately able to identify any version of AFL which allows an empty set of input files, and the command line itself will refuse to start at all without providing a valid input directory with -i.
    • This is incredibly confusing, and the crate I'm contributing to has had a completely nonfunctional fuzz command line for months under the impression that they were doing it right somehow.
  • The book goes on to state that "filenames don't matter" for input examples. This is a bit of a strange phrasing given that AFL (at least the version afl-fuzz++4.33c I have installed) does provide a -e ext flag that allows filtering inputs by file extension.
  • Finally, there is no link to the afl README, which describes how to craft effective input examples, and would have allowed users to figure out for themselves that this docbook's statement about input examples not being strictly required was outdated and/or false.

Solution

  • Provide a brief description of what AFL requires from input examples.
  • Mention the -e ext flag.
  • Link to the AFL README, and mention dictionaries for more complex input.
  • Clarify that #[cfg(fuzzing)] is enabled for cargo afl build as well.

@cosmicexplorer cosmicexplorer changed the title clarify that fuzz inputs are necessary and how to craft them clarify that afl fuzz inputs are necessary and how to craft them Sep 30, 2025
@cosmicexplorer cosmicexplorer changed the title clarify that afl fuzz inputs are necessary and how to craft them clarify that afl fuzz inputs are necessary and link to how to craft them Sep 30, 2025
@smoelius
Copy link
Copy Markdown
Member

Thank you, @cosmicexplorer. Your observations are spot-on and your changes definitely improve the tutorial. 🙏

@smoelius smoelius merged commit da418b0 into rust-fuzz:master Sep 30, 2025
2 checks passed
@cosmicexplorer
Copy link
Copy Markdown
Contributor Author

Thanks so much!! ^_^ I was really worried I was missing something serious. Really appreciate confirming that I had the right idea!

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.

2 participants