{"id":"XE-4317","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":730,"title":"BFT quorum deadlock: hardcoded maxConflictHashes cap truncates 11th+ valid conflict candidates, enabling permanent account censorship","area":"consensus","claimed_tier":null,"assessed_tier":null,"verdict":"duplicate","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-10T21:44:10.848618+00:00","updated_at":"2026-11-15T17:42:16.598376+00:00","source_created_at":null,"told_at":"2026-11-15T17:42:49.270044+00:00","status_changed_at":"2026-11-15T17:42:49.226473+00:00","url":"https://bounty.xe.network/XE-4317","body":"## Vulnerability Summary\n\nIn `core/conflict.go:52-80`, `recordConflict` caps the maximum number of recorded candidate hashes per account conflict to a hardcoded constant:\n```go\nconst maxConflictHashes = 10\nif len(record.BlockHashes) >= maxConflictHashes {\n    return false, nil\n}\nrecord.BlockHashes = append(record.BlockHashes, newHash)\n```\n\nWhen 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`.\n\nIn `core/ledger.go:854-860`:\n```go\nrecord, _ := cs.GetConflict(b.Account, b.Previous)\nbodyNewlyStaged := false\nif record != nil && containsConflictHash(record.BlockHashes, b.Hash) {\n    if prev, _ := cs.GetStagedBlock(b.Hash); prev == nil {\n        bodyNewlyStaged = true\n    }\n    if err := cs.SaveStagedBlock(b); err != nil {\n        return fmt.Errorf(\"SaveStagedBlock: %w\", err)\n    }\n}\n```\n\nBecause `containsConflictHash(record.BlockHashes, b.Hash)` evaluates to `false` for any 11th+ block, `cs.SaveStagedBlock(b)` is never executed. Consequently:\n1. The 11th+ candidate block is never saved in the staged block store.\n2. 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`).\n3. The block is permanently treated as a phantom or un-staged candidate, completely deadlocking conflict resolution and permanently halting transaction processing for that account.\n\n---\n\n## Vulnerable Code Location\n\n`core/conflict.go:70-74`:\n```go\nconst maxConflictHashes = 10\nif len(record.BlockHashes) >= maxConflictHashes {\n    return false, nil\n}\nrecord.BlockHashes = append(record.BlockHashes, newHash)\n```\n\n`core/ledger.go:854-860`:\n```go\nrecord, _ := cs.GetConflict(b.Account, b.Previous)\nbodyNewlyStaged := false\nif record != nil && containsConflictHash(record.BlockHashes, b.Hash) {\n    if prev, _ := cs.GetStagedBlock(b.Hash); prev == nil {\n        bodyNewlyStaged = true\n    }\n    if err := cs.SaveStagedBlock(b); err != nil {\n        return fmt.Errorf(\"SaveStagedBlock: %w\", err)\n    }\n}\n```\n\n---\n\n## Attack & Failure Mechanism\n\n1. **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).\n2. **Cap Exhaustion**: `recordConflict` appends candidates until `len(record.BlockHashes) == 10`.\n3. **Dropping Legitimate Successor**: When the authentic, intended user transaction arrives (the 11th candidate):\n   - `recordConflict` hits `len(record.BlockHashes) >= maxConflictHashes` and returns `false, nil` without appending the hash.\n   - `core/ledger.go:854` checks `containsConflictHash(record.BlockHashes, b.Hash)`. Because it is not in the slice, `SaveStagedBlock(b)` is bypassed.\n4. **Permanent Deadlock**:\n   - The wider network BFT quorum selects the authentic 11th candidate with ≥67% vote weight.\n   - On the local node, `finalTally` rejects the vote tally because `qm.ledger.GetBlockOrStaged(v.BlockHash)` returns `nil`.\n   - The node treats the consensus winner as missing/phantom forever, preventing conflict clearance and causing perpetual censorship on the account.\n\n---\n\n## Impact\n\n- **Permanent Censorship / DoS**: Accounts can have their transaction stream permanently jammed by front-running 10 conflicting dummy blocks.\n- **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.\n\n---\n\n## Proposed Mitigation\n\n1. Replace the hardcoded `maxConflictHashes` with an eviction strategy based on vote weight or proof-of-work difficulty rather than a first-seen FIFO cutoff.\n2. If a cap must exist, ensure that newly staged blocks that receive legitimate validator votes can replace zero-weight candidate hashes in `record.BlockHashes`.\n3. Allow `SaveStagedBlock` to retain blocks that have valid signatures and pass `ValidateStagedBlock`, tracking them in an unbound or dynamically pruned pool until quorum resolution.","patch_refs":[],"thread":[{"id":6457,"source":"desk","source_ref":"reply:5097","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, file a new report that links https://bounty.xe.network/XE-4317 and says what differs; it is read like any other.","created_at":"2026-11-15T17:42:16.598376+00:00"}]}