Commit Graph

11 Commits

Author SHA1 Message Date
greptile
7e76cf360c docs: Add more details about fuzzing (#201)
Add more documentation to fuzz/README.md, especially when it comes to
interpreting out-of-memory issues.

Co-authored-by: y <y>
Co-authored-by: parazyd <parazyd@users.noreply.github.com>
2023-08-30 05:44:42 +00:00
y
374d19851f fuzz: Restructure corpora git structure
Use artifacts/ rather than corpus/ to track fuzz inputs. corpus appears
to be a temporary directory that will be modified when minimizing test
cases using commands like `cargo fuzz cmin` or `cargo fuzz tmin`. For
this reason it's not suitable for long-term storage and is likely to
make the git commit-staging process very messy.
2023-08-30 05:42:23 +00:00
parazyd
cbe9c64065 chore: Update crate dependencies 2023-08-29 13:08:35 +02:00
parazyd
0440864b3a fuzz: Use patched blake2_simd crate. 2023-08-29 08:58:49 +02:00
y
433ff9d0a6 fuzz: Add harness for decoding strings from bytes
- Add a fuzz harness for deserializing strings from bytes
- Add entry to corpora that triggers an out-of-memory issue in string
  decoding
2023-08-25 06:37:57 +00:00
y
5ac92e3093 fuzz: improve readme and corpora wording 2023-08-24 18:37:46 +00:00
y
7c1cd791f2 Add out-of-memory crash to corpora
This input caused an out-of-memory bug. I haven't figured out why yet
but it's good to keep this in the corpus for future testing.

Something interesting: the fuzzer brute-forced the MAGIC BYTES for the
binary on its own! This file is a good starting point for future fuzzing
because it contains the magic bytes: subsequent runs can start from here
instead of needing to "find" the magic bytes via brute forcing every
time
2023-08-24 18:37:46 +00:00
y
bc16b6c475 Add instructions for building the fuzzing corpus
- Inform devs how to build an organized and useful corpora based on the
results of fuzz testing.
- Modify .gitignore to allow corpus/ tracking. Note: files in corpus/
  should not be blindly committed but selectively added based on
  usefulness
- Add emptyfile to zkas-decoder corpus because it caused a panic
2023-08-24 18:37:46 +00:00
y
382205ad81 Add fuzzer for ZkBinary::decode() 2023-08-24 18:37:46 +00:00
parazyd
fe215e632c fuzz: Add zkas Lexer fuzzer. 2023-08-23 23:54:33 +02:00
parazyd
00e4456787 fuzz: Serialize attempt 2023-08-23 22:21:42 +02:00