{"id":"XE-13377","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"531","source_url":"https://github.com/xeprotocol/xe/issues/531","reporter_id":2252,"title":"Gossip validators accept blocks and statechain blocks with garbage signatures — no signature verification on inbound blocks","area":"p2p-sync","claimed_tier":"minor","assessed_tier":null,"verdict":"invalid","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"invalid","github_state":"closed","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:13.519880+00:00","updated_at":"2026-11-20T01:07:39.001865+00:00","source_created_at":"2026-11-13T03:22:53+00:00","told_at":"2026-11-20T01:06:13+00:00","status_changed_at":"2026-11-20T00:50:09.432494+00:00","url":"https://bounty.xe.network/XE-13377","body":"**Suggested tier:** Low\n\n**XE address (reward destination):** 9b663fdac108be34a3b715ef78a9f9bd878af6ef8142f388c6514918e6852dd7\n\n## Summary\n\nBlocks and statechain blocks received over gossip are never signature-checked:\n\n- `net/gossip.go: onBlockMessage` — the block is passed straight to `handleBlockGossip`, which calls `n.ledger.AddBlock(block)` after a re-validation that **never calls `VerifyBlockSignature`** (core/ledger.go: `validateAndAddBlock` → `validateBlockBasic`, `validateBlockSequential`).\n- `net/gossip.go: onStatechainBlockMessage` — same: straight to `n.scLedger.AddBlock(block)` with no signature check.\n- `net/sync.go: requestSync` — a peer's sync response is trusted the same way.\n\n`core/ledger.go: validateBlockSequential` checks the previous hash, timestamp window, fees, balance, and the block hash — but NOT the signature. `VerifyBlockSignature` exists in `core/ledger.go` and is called only from `core/validate_vote.go` (vote validation) and `core/ledger.go: rollback.go` (`rollbackBlockAt`, called from `RollbackBlock`).\n\nThis is a consensus-layer integrity gap: a garbage-signature block can enter the ledger through gossip. The ledger does not accept it blindly — `validateBlockSequential` still enforces the previous-hash chain, timestamp window, fee, and balance rules, and `AddBlock` rejects blocks that fail those checks — so the practical impact is limited to garbage blocks that pass those checks being stored and gossiped further (the network then wastes bandwidth and storage on them, and a fork can be created by a garbage block that passes the sequential checks).\n\n## Impact\n\nLow: no direct fund loss, no account freeze, no consensus halt — the ledger's sequential checks still bound what a garbage block can do. The gap is real but its blast radius is limited: garbage blocks that pass the sequential checks can be stored and re-gossiped, wasting bandwidth/storage and potentially creating forks that then need to be resolved by the conflict machinery.\n\n## Steps to reproduce\n\nUnit test against the real node code (`github.com/xeprotocol/xe`, testnet-0005, commit `89a542e`):\n\n```\ngit clone https://github.com/xeprotocol/xe\ncd xe\ncp trackb_gossip_test.go core/\ngo test ./core -run TestTrackB_GossipAcceptsGarbageSignature -v -count=1\n```\n\nNote: `trackb_gossip_test.go` is NOT in the public repository — the PoC test file is attached to this issue; without it, the XE team cannot run this reproduction.\n\n`TestTrackB_GossipAcceptsGarbageSignature`: a block with a garbage signature (random bytes) is fed through the real gossip path.\n\n**Expected:** the block is rejected for bad signature.\n**Actual (reproduced 2026-11-13):** the block is accepted into the ledger.\n```\nCONFIRMED: block with garbage signature accepted into ledger (no signature verification on gossip path)\n```\n\n## Root cause\n\n`net/gossip.go: onBlockMessage` / `onStatechainBlockMessage` and `net/sync.go: requestSync` never call `VerifyBlockSignature`; `core/ledger.go: validateBlockSequential` does not verify the block signature (only `validate_vote.go` and `rollback.go` call it).\n\n## Suggested fix\n\nCall `VerifyBlockSignature` in `validateBlockSequential` (or at the gossip/sync entry points) so every inbound block is signature-checked before being stored or re-gossiped.\n\n## Controls verified (same PoC file, all PASS)\n\n- A block with a wrong previous hash is rejected (`validateBlockSequential` previous-hash check).\n- A block with a future timestamp is rejected (timestamp window).\n- A block with insufficient balance is rejected (balance check).\n- A block with a tampered fee is rejected (fee check).\n\n[trackb_gossip.txt](https://github.com/user-attachments/files/34781689/trackb_gossip.txt)","patch_refs":[],"thread":[{"id":13679,"source":"github","source_ref":"7027135216","author":"XE desk","team":true,"body":"Thanks for the report. We read it against the code and could not confirm a bug in what it describes.\n\nThis report is closed as invalid. If we have missed something, file a new report that links\nhttps://bounty.xe.network/XE-13377 and says what; it is read like any other.","created_at":"2026-11-20T01:06:13+00:00"}]}