[Medium] Genesis loading never cross-binds the ledger/statechain genesis pair: a mixed-network pair is accepted silently
Report
Title
[Medium] Genesis loading never cross-binds the ledger/statechain genesis pair: a mixed-network pair is accepted silently
Summary
A node loads two genesis files — the ledger genesis and the statechain genesis. node/genesis.go ApplyGenesisOverride validates each file only in isolation; nothing ties the ledger genesis to the statechain genesis's network. A mixed pair — e.g. a testnet-0003 ledger genesis with a testnet-0005 statechain genesis — loads cleanly.
Impact / worst case
- The node advertises / joins testnet-0005 while running a ledger rooted in a different network's genesis.
- Ledger sync with real peers can never converge, and there is no startup error — the misconfiguration is silent.
- Worst case is a supply-chain / operator-error vector: anyone handed a mixed genesis bundle (packaging mistake, tampered bundle) runs a permanently desynced node that looks healthy at boot.
Root cause
node/genesis.go(ApplyGenesisOverride): the two genesis files are validated independently; no cross-check that both declare the same network.
Reproduction (PoC, local — deterministic)
TestNetPOCM — loads a testnet-0003 ledger genesis + testnet-0005 statechain genesis: accepted with no error (FAIL = bug reproduced). The matched testnet-0005 pair control PASSes. Re-verified 19 Nov 2026.
Run (from a repo copy, PoC file copied into node/):
go test ./node/ -run 'TestNetPOCM' -v -count=1
Dedup check (checked against 877 unique public tickets, 19 Nov 2026)
Closest:
- XE-3512 — statechain block hash carries no network ID (block-replay mechanism; different file, different effect).
- XE-0036 / XE-0508 — shipped-genesis hash-mismatch boot failures (a single file's hash mismatch, not pair binding).
No ticket covers cross-binding the genesis pair. Stated plainly: exploitation requires an operator to be handed a mixed bundle — but no closest ticket shares the file, mechanism, or fix.
Suggested fix
- At genesis load, require both genesis files to declare the same network ID and fail startup on mismatch.
Attachments to include on filing
net_genesis_pair_test.go(testTestNetPOCM; copy intonode/).
Payout
Payout address: 1338a9d472828e5b8cab097cb77979cf6062fdb5678ad1f759a48ddc8aad7189
Thread
Nothing public yet.