Bounty
XE-4317 · Bounty

BFT quorum deadlock: hardcoded maxConflictHashes cap truncates 11th+ valid conflict candidates, enabling permanent account censorship

Closed · duplicate — web filed 2026-11-10 21:44 UTC by xe:e4cd6974

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:

  1. The 11th+ candidate block is never saved in the staged block store.
  2. 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 GetBlockOrStaged during finalTally (core/quorum.go:120-123).
  3. 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

  1. 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).
  2. Cap Exhaustion: recordConflict appends candidates until len(record.BlockHashes) == 10.
  3. Dropping Legitimate Successor: When the authentic, intended user transaction arrives (the 11th candidate):
    • recordConflict hits len(record.BlockHashes) >= maxConflictHashes and returns false, nil without appending the hash.
    • core/ledger.go:854 checks containsConflictHash(record.BlockHashes, b.Hash). Because it is not in the slice, SaveStagedBlock(b) is bypassed.
  4. Permanent Deadlock:
    • The wider network BFT quorum selects the authentic 11th candidate with ≥67% vote weight.
    • On the local node, finalTally rejects the vote tally because qm.ledger.GetBlockOrStaged(v.BlockHash) returns nil.
    • 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

  1. Replace the hardcoded maxConflictHashes with an eviction strategy based on vote weight or proof-of-work difficulty rather than a first-seen FIFO cutoff.
  2. If a cap must exist, ensure that newly staged blocks that receive legitimate validator votes can replace zero-weight candidate hashes in record.BlockHashes.
  3. Allow SaveStagedBlock to retain blocks that have valid signatures and pass ValidateStagedBlock, tracking them in an unbound or dynamically pruned pool until quorum resolution.

Thread

Joseph Denneteam2026-11-15 17:42 UTCdesk

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.