# Incorrect error handling in state machine

Overly broad error handling in Clementine's process_block_parallel halts all state machines permanently when one errors, potentially enabling malicious kickoff reimbursement and bridge drain.

- Payout: Contest reward
- Severity: medium
- Program: Clementine
- Credited: n4nika
- Disclosed: 2025-10-29
- Write-up quality: 6/10
- Original: https://cdn.cantina.xyz/reports/cantina_competition_clementine_aug2025.pdf#3.2.2
- Library page: https://bugbountylibrary.com/r/cantina%3Aclementine_aug2025%3A3.2.2
- Tags: domain:web3 impact:dos impact:funds-loss kind:contest platform:cantina sev:medium technique:source-review vuln:business-logic vuln:dos

**Target:** state machine transition processing (process_block_parallel)
**Root cause:** process_block_parallel reverts all state machines to checkpoint and returns an error if any single machine errors, with no mechanism to remove persistently failing machines, so one corrupted machine blocks all transitions.
**Steps:**
1. Trigger an error in a single state machine's transition during process_block_parallel.
2. Observe all_errors non-empty causes kickoff_machines and round_machines to revert to checkpoints.
3. Function returns Err, halting all state transitions permanently since the failing machine is never removed.
**How found:** Code review of process_block_parallel error handling; noticed no removal mechanism for persistently erroring machines.
**Exploitation:** Attacker induces a persistent error in one state machine so all state transitions halt; challengers cannot send disprovals on time, allowing reimbursement of malicious kickoffs and draining the bridge.
**Escalation:** Single stuck machine cascades to system-wide halt, enabling bridge drain via unchallenged malicious kickoffs.
**Insight:** In multi-instance state machine designs, check whether a single instance's error path reverts or blocks all instances; a per-machine quarantine/retry is needed to avoid global liveness failure.
