{"id":"XE-13239","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"368","source_url":"https://github.com/xeprotocol/xe/issues/368","reporter_id":1343,"title":"[Severe] Finality: one representative can finalize both sides of a fork; confirmConflict finalizes winners without dependency check (account bricking, cross-partition duplication)","area":"consensus","claimed_tier":"severe","assessed_tier":null,"verdict":"duplicate","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"closed","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:02.675293+00:00","updated_at":"2026-11-20T00:06:57.787486+00:00","source_created_at":"2026-11-11T09:34:17+00:00","told_at":"2026-11-20T00:05:10+00:00","status_changed_at":"2026-11-20T00:04:40.494728+00:00","url":"https://bounty.xe.network/XE-13239","body":"## Summary\n\nTwo related finality defects, demonstrated on a local devnet (commit 89a542e, stock binary, private genesis — public testnet untouched):\n\n1. **F2 (Severe): no equivocation handling.** A single rep holding ≥67% of delegated weight can cast final votes for *both* sides of a fork on different node subsets. On live testnet-0005 the genesis rep holds ~99.999985% of weight, so finality is effectively 1-of-1 and that one rep can finalize anything unilaterally.\n2. **F3 (High): `confirmConflict` finalizes a conflict winner without checking that its dependencies are finalized.** Demonstrated: an attacker final vote finalized receive R1b on all nodes while its source send S1b was still unfinalized. Correction to the naive impact: on a connected network the swap then refuses to roll back the finalized receive, so the conflict becomes *permanently unresolvable* and the sender account is bricked (`account has unresolved conflict` on every new block). Across a partition the duplication *is* real: one partition finalizes the receive, the other finalizes the conflicting send, and after rejoin both finalized histories persist (B finalized +100 XE on P1, C finalized +100 XE on P2, from one 100 XE spend).\n\n## Evidence\n\n- `PutFinalVoteIfAbsent` (`store/badger_store.go:1533`) and the `existing.Final` early-return (`core/vote.go:134-141`) keep the first-seen final vote per node. Nothing stops a rep signing a second final vote for the other side and sending it to different peers; `ValidateVote` (`core/vote.go:225`) has no \"already voted otherwise\" check. Repo-wide grep for `equivoc*`/`slash*` returns nothing — no equivocation evidence, no slashing, no vote-conflict reporting.\n- `confirmConflict` (`core/quorum.go:263` → `:360` `finalizeBlock`) verifies the winner's signature, PoW, and `ValidateStagedBlock` — but **never calls `depsFinalized`**. Grep confirms `depsFinalized` is only called from `core/finalization.go:144` and `:280` (the voter's own emission path), never on the tally/accept path.\n\n## Reproduction (full PoC attached as poc-f2f3.md)\n\n3-node devnet, attacker rep at 69.995% weight (clears the 67% quorum alone), honest reps at 15.005%/15.0%. Honest finalization sanity-checked first (funding chain finalized, `spendable == balance`).\n\n- **F2:** attacker rep signed final votes for both sides of the same fork (same `ConflictPrev`, both `Final=true`) and delivered each to a different partition. Both partitions' `FinalHeight` advanced 1→2 with **different blocks finalized at height 2** (P1: S1d `155ed66f…`, P2: S2d `85f99ef1…`). After rejoining to a full mesh the split persists.\n- **F3:** S1 (send 100 XE A→B), R1 (B receives), S2 (same 100 XE A→C, same `Previous`). One attacker final vote finalized R1b on **all three nodes** (`GET /blocks/38699ab1… → finalized=true`) while S1b stayed unfinalized. The tally then selected S2b, but the swap cascade refused to roll back the finalized receive (hundreds of `refusing to roll back finalized block` log lines); the account is bricked with HTTP 503 `account has unresolved conflict` on every new block. Cross-partition variant (F3b): receive finalized on P1 only, conflicting send finalized on P2 → 200 XE of finalized spendable value from one 100 XE spend, split persists after rejoin.\n\n## Fix direction\n\nEquivocation evidence + slashing/exclusion in tally; `depsFinalized` check in `confirmConflict`; consider quorum rules that a single rep cannot satisfy alone on the live genesis.\n\nMy XE address for any reward: 5422b32c07cf2b2ca53b00c2073be5a895dae3fdf13645c05ebdd1c08864cf8f\n\n— @agngmarley\n\n[poc-f2f3.md](https://github.com/user-attachments/files/34680852/poc-f2f3.md)","patch_refs":[],"thread":[{"id":8973,"source":"github","source_ref":"6932708848","author":"Alfonova-Node","team":false,"body":"Status check at HEAD 89a542e (testnet-0005), finding F3: there is still no depsFinalized check in confirmConflict (core/quorum.go:263-375). The winner there is checked only with VerifyBlock, PoW, and ValidateStagedBlock before SwapBlock + finalization. depsFinalized exists (core/finalization.go:44) but is consulted only when a node emits its own vote (castVoteLocked, core/finalization.go:144) or final vote (emitFinalLocked, core/finalization.go:280) — never when a quorum winner is promoted or finalized. A winner with unfinalized dependencies can still be installed. Requesting F3 stay open until a dependency-finality check is added to the promotion path.","created_at":"2026-11-16T23:37:04+00:00"},{"id":12837,"source":"github","source_ref":"7025804044","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-13239 and says what differs; it is read like any other.","created_at":"2026-11-20T00:05:10+00:00"}]}