Bounty
XE-13378 · Bounty

Votes for nonexistent conflicts are accepted and stored forever — phantom votes accumulate unboundedly

Closed · duplicate —claimed Minor xe#532 filed 2026-11-13 03:23 UTC by AIRDROP TREASURESS

Report

Suggested tier: Low

XE address (reward destination): 9b663fdac108be34a3b715ef78a9f9bd878af6ef8142f388c6514918e6852dd7

Summary

core/vote.go: ValidateVote and core/quorum.go: receiveVoteInner never check that the conflict a vote references actually exists. A vote for a nonexistent (account, prev) pair is accepted and stored in the vote store forever — no expiry, no eviction, no cleanup. The vote store grows unboundedly: 200 phantom votes were proven stored in the PoC, and there is no upper bound on how many can be accumulated.

Impact

Unbounded storage growth on every node: an attacker can flood the network with votes for nonexistent conflicts, and every node stores them forever. The votes never affect consensus (they reference no real conflict, so they are never tallied), so the impact is storage / memory exhaustion only — hence Low. No funds, no finality, no account freeze.

Steps to reproduce

Unit test against the real node code (github.com/xeprotocol/xe, testnet-0005, commit 89a542e):

git clone https://github.com/xeprotocol/xe
cd xe
cp trackb_quorum_test.go core/
cp trackb_attestation_test.go core/
go test ./core -run TestTrackB_PhantomVotes -v -count=1

Note: trackb_quorum_test.go / trackb_attestation_test.go are NOT in the public repository — the PoC test files are attached to this issue; without them, the XE team cannot run this reproduction.

TestTrackB_PhantomVotes: 200 votes for nonexistent conflicts (random account/prev pairs, valid rep signatures) are fed through the real vote path.

Expected: votes for nonexistent conflicts are rejected. Actual (reproduced 2026-11-13): all 200 votes are accepted and stored; the vote store holds 200 phantom entries with no expiry.

CONFIRMED: 200 phantom votes for nonexistent conflicts accepted and stored forever (no existence check, no expiry)

Root cause

core/vote.go: ValidateVote does not check that the referenced conflict exists in the conflict store; core/quorum.go: receiveVoteInner stores the vote unconditionally. There is no TTL, cap, or sweep for phantom votes (unlike sweepStaleConflicts, which only handles real conflicts).

Suggested fix

Reject votes whose (account, prev) has no matching conflict record, and/or add a TTL + cap to the vote store with a periodic sweep of votes that reference no live conflict.

Controls verified (same PoC file, all PASS)

  • Duplicate / replayed / equivocating votes: vote store keyed by (account, prev, rep), so a rep flipping a non-final vote overwrites (1 stored vote), an exact replay leaves 1 entry, and a final vote LOCKS (equivocating final vote dropped). 45.8% does not finalize; 84% finalizes (TestTrackB_DuplicateAndEquivocatingVotes).
  • Vote timestamp window: 6-min-old and 6-min-future votes rejected; fresh votes accepted (5-minute window).
  • Finalize-then-conflict: after S1 finalized by 84% final votes, a new conflicting block is rejected ("block conflicts with finalized block … — rejected"); core/rollback.go refuses to roll back finalized blocks. Happy path also passes: staged winner S2 swaps in, loser S1 demoted off-chain, S2 finalized at height 2, conflict record cleaned up.
  • Attestations: duplicates count once, non-timekeeper ignored, forged attestation rejected, ±10 min skew enforced, threshold enforced after filtering.

trackb_quorum.txt trackb_attestation.txt

Thread

Joseph Denneteam2026-11-20 00:51 UTCgithub

Thanks. This is the same finding as https://bounty.xe.network/XE-0109, 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-13378 and says what differs; it is read like any other.