You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51-96Lines changed: 51 additions & 96 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,12 @@ SSV (Secret Shared Validator) is a protocol that enables the distributed control
13
13
- Message receiving pipeline
14
14
15
15
### Differential Fuzzing
16
-
**Critical for network security**: Compares behavior between Go and Rust SSV implementations to identify discrepancies that could cause:
17
-
-**Network splits** due to consensus disagreements
18
-
-**Chain forks** from encoding/validation differences
19
-
-**Validator penalties** from inconsistent message handling
16
+
Critical for network security: Compares behavior between Go and Rust SSV implementations to identify discrepancies that could cause:
17
+
- Network splits due to consensus disagreements
18
+
- Chain forks from encoding/validation differences
19
+
- Validator penalties from inconsistent message handling
20
20
21
-
See [`diff_fuzzing/README.md`](diff_fuzzing/README.md)for detailed information about differential fuzzing targets, risk assessment, and implementation roadmap.
21
+
Check out [TROPHY.md](TROPHY.md)to see real bugs and discrepancies discovered through differential fuzzing that have been fixed in both implementations.
> **Note**: Differential fuzzing targets compare behavior between Go (ssv-spec) and Rust (Anchor) implementations to identify discrepancies that could cause network splits or consensus failures.
120
+
### Standard Targets (Component Testing)
121
+
-`validate_ssv_message` - SSVMessage validation
122
+
-`qbft_target` - QBFT consensus mechanism
123
+
-`custom_ssz` - SSZ encoding/decoding
124
+
-`receive_target` - Message receiving pipeline
125
+
-`combine_signatures` - BLS signature combination
126
+
-`fuzz_key_id_try_from` - KeyId conversion
127
+
-`fuzz_database_states` - Database states consistency
The **run_fuzzer.sh** script includes corpus generation as a built-in option, providing easy access to the intelligent corpus generator:
199
-
200
-
-**Menu-driven corpus generation**: Select corpus generation from the script's interactive menu
201
-
-**Target-specific optimization**: Generate test cases tailored for specific fuzzing targets
202
-
-**Structural variation strategy**: Maximize AFL coverage with high-quality, non-redundant test cases
203
-
-**Efficiency optimization**: Achieve 20-75% efficiency (unique files after afl-cmin)
204
-
-**Seamless integration**: No need to leave the fuzzing script to generate corpus
190
+
The `run_fuzzer.sh` script includes built-in corpus generation accessible from the menu. It provides target-specific optimization and structural variation for maximum AFL coverage.
205
191
206
-
### Manual Corpus Generator (Optional)
207
-
208
-
For advanced users who want manual control over corpus generation:
192
+
For manual control:
209
193
210
194
```bash
211
195
cd corpus_generator
212
-
cargo run # Interactive mode - shows all available targets
213
-
cargo run -- <target_name># Generate corpus for specific target
196
+
cargo run # Interactive mode
197
+
cargo run -- <target_name># Generate for specific target
> **Note**: Manual corpus generation is only needed for specialized testing scenarios. The run_fuzzer.sh script provides corpus generation as an integrated option.
230
-
231
200
## Advanced Usage
232
201
233
202
### Corpus Management
234
203
235
-
The fuzzing script automatically handles:
236
-
-**Resuming sessions**: Detects existing fuzzing results and offers to resume
237
-
-**Input generation**: Creates basic test cases for new targets automatically
238
-
-**Directory management**: Sets up proper input/output directory structure
204
+
The fuzzing script automatically handles session resuming, input generation, and directory management.
239
205
240
206
For manual corpus management:
241
-
-**Generate optimized corpus**: Use the corpus generator (see above) before fuzzing
242
-
-**Minimize corpus**: Use `afl-cmin -i afl_workdir/<target>/output/queue -o minimized_corpus -- target/debug/<target>`
243
-
-**View statistics**: Use `cargo afl whatsup -s afl_workdir/<target>/output` or select option 2 in the fuzzing script
244
-
245
-
### Fuzzing Script Features
246
-
247
-
The `run_fuzzer.sh` script provides:
248
-
-**Interactive menu**: Easy target selection from all available fuzzing targets
249
-
-**Automatic setup**: Creates input/output directories and basic test cases
250
-
-**Smart resuming**: Detects previous sessions and offers to continue
251
-
-**Build integration**: Automatically builds targets with AFL instrumentation
252
-
-**Statistics viewing**: Built-in stats display for monitoring progress
253
-
-**Error handling**: Validates dependencies and project structure
This document tracks bugs and implementation discrepancies discovered through differential fuzzing between the Anchor (Rust) and SSV (Go) implementations.
4
+
5
+
**Note**: This is an ongoing effort. The issues listed here are current findings, and more discrepancies are likely to be discovered as fuzzing continues.
6
+
7
+
## Discovered Issues
8
+
9
+
### Anchor (Rust) Implementation
10
+
11
+
1.**Bump round on future justified proposal** ([PR #529](https://github.com/sigp/anchor/pull/529))
12
+
- Issue: Incorrect round handling when receiving justified proposals from future rounds
13
+
- Impact: Could cause validators to remain stuck in old rounds
14
+
15
+
2.**Allow reaching consensus in PREPARE state** ([PR #527](https://github.com/sigp/anchor/pull/527))
16
+
- Issue: Consensus logic prevented valid state transitions from PREPARE
17
+
- Impact: Potential liveness issues in certain consensus scenarios
18
+
19
+
3.**Validation for prepared round changes before insertion** ([PR #528](https://github.com/sigp/anchor/pull/528))
20
+
- Issue: Missing validation before inserting prepared round change messages
21
+
- Impact: Could allow invalid messages into the state machine
22
+
23
+
4.**Store messages without full data** ([PR #538](https://github.com/sigp/anchor/pull/538))
24
+
- Issue: Message storage logic required unnecessary full data
25
+
- Impact: Memory inefficiency and potential state inconsistencies
0 commit comments