BFT quorum deadlock: hardcoded maxConflictHashes cap truncates 11th+ valid conflict candidates, enabling permanent account censorship
Report
Vulnerability Summary
In core/conflict.go:52-80, recordConflict caps the maximum number of recorded candidate hashes per account conflict to a hardcoded constant:
const maxConflictHashes = 10
if len(record.BlockHashes) >= maxConflictHashes {
return false, nil
}
record.BlockHashes = append(record.BlockHashes, newHash)
When an account experiences multiple competing forks or concurrent block generation attempts (whether caused by network latency, mobile micro-partitions, or an intentional spamming attack submitting 10 dummy micro-blocks), any subsequent (11th or higher) legitimate block candidate sharing the same Previous frontier is silently dropped by recordConflict.
In core/ledger.go:854-860:
record, _ := cs.GetConflict(b.Account, b.Previous)
bodyNewlyStaged := false
if record != nil && containsConflictHash(record.BlockHashes, b.Hash) {
if prev, _ := cs.GetStagedBlock(b.Hash); prev == nil {
bodyNewlyStaged = true
}
if err := cs.SaveStagedBlock(b); err != nil {
return fmt.Errorf("SaveStagedBlock: %w", err)
}
}
Because containsConflictHash(record.BlockHashes, b.Hash) evaluates to false for any 11th+ block, cs.SaveStagedBlock(b) is never executed. Consequently:
- The 11th+ candidate block is never saved in the staged block store.
- Even if the majority of BFT validators (≥67% quorum weight) recognize and vote for this 11th block as the legitimate successor, a local node cannot retrieve its body via
GetBlockOrStagedduringfinalTally(core/quorum.go:120-123). - The block is permanently treated as a phantom or un-staged candidate, completely deadlocking conflict resolution and permanently halting transaction processing for that account.
Vulnerable Code Location
core/conflict.go:70-74:
const maxConflictHashes = 10
if len(record.BlockHashes) >= maxConflictHashes {
return false, nil
}
record.BlockHashes = append(record.BlockHashes, newHash)
core/ledger.go:854-860:
record, _ := cs.GetConflict(b.Account, b.Previous)
bodyNewlyStaged := false
if record != nil && containsConflictHash(record.BlockHashes, b.Hash) {
if prev, _ := cs.GetStagedBlock(b.Hash); prev == nil {
bodyNewlyStaged = true
}
if err := cs.SaveStagedBlock(b); err != nil {
return fmt.Errorf("SaveStagedBlock: %w", err)
}
}
Attack & Failure Mechanism
- Conflict Saturation: An attacker observes a target account or creates an initial conflict, then broadcasts 9 additional lightweight validly-signed conflicting blocks (or network gossip forks naturalize 10 candidates).
- Cap Exhaustion:
recordConflictappends candidates untillen(record.BlockHashes) == 10. - Dropping Legitimate Successor: When the authentic, intended user transaction arrives (the 11th candidate):
recordConflicthitslen(record.BlockHashes) >= maxConflictHashesand returnsfalse, nilwithout appending the hash.core/ledger.go:854checkscontainsConflictHash(record.BlockHashes, b.Hash). Because it is not in the slice,SaveStagedBlock(b)is bypassed.
- Permanent Deadlock:
- The wider network BFT quorum selects the authentic 11th candidate with ≥67% vote weight.
- On the local node,
finalTallyrejects the vote tally becauseqm.ledger.GetBlockOrStaged(v.BlockHash)returnsnil. - The node treats the consensus winner as missing/phantom forever, preventing conflict clearance and causing perpetual censorship on the account.
Impact
- Permanent Censorship / DoS: Accounts can have their transaction stream permanently jammed by front-running 10 conflicting dummy blocks.
- Consensus Partition: Nodes that observe different orderings of the first 10 conflict blocks will store different candidate sets in
SaveStagedBlock, leading to divergent quorum evaluations and chain stalls.
Proposed Mitigation
- Replace the hardcoded
maxConflictHasheswith an eviction strategy based on vote weight or proof-of-work difficulty rather than a first-seen FIFO cutoff. - If a cap must exist, ensure that newly staged blocks that receive legitimate validator votes can replace zero-weight candidate hashes in
record.BlockHashes. - Allow
SaveStagedBlockto retain blocks that have valid signatures and passValidateStagedBlock, tracking them in an unbound or dynamically pruned pool until quorum resolution.
Thread
Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, file a new report that links https://bounty.xe.network/XE-4317 and says what differs; it is read like any other.