This project performs fuzzing on karalabe/ssz based on Ethereum 2.0 Consensus Spec tests.
- Corpus Collection
- Collects valid SSZ samples from multiple fork consensus spec test files.
- Coverage-Guided Fuzzing
- Uses
gofuzz-shim
and builds withlibFuzzer
for coverage-based fuzzing.
- Uses
- Differential Testing
- Differential fuzzing is performed by bridging karalabe/ssz to match the fastssz structure and comparing their re-encoded outputs.
- Cross-Fork Validation
- Ensures proper decoding/encoding of the same SSZ input across different fork settings.
- Go 1.18 or later (to use Go's built-in fuzzing functionality)
- Standard Go development environment
git clone https://github.com/KindKillerwhale/sszfuzzer.git
cd sszfuzzer
Execute the oss-fuzz.sh
script to build each SSZ object using gofuzz-shim and libFuzzer:
./oss-fuzz.sh
Once built, the binary can be executed to start fuzzing.
Contributions are always welcome! Feel free to create an issue or submit a pull request.