{"id":"XE-0606","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":230,"title":"[High chain] Unauthenticated network admission + FIFO ban eviction + sync amplification allow a persistent, unmitigable network split / resync DoS","area":"p2p-sync","claimed_tier":"high","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-05T06:15:32.486556+00:00","updated_at":"2026-11-14T22:53:53.253898+00:00","source_created_at":null,"told_at":"2026-11-14T22:53:53.534114+00:00","status_changed_at":"2026-11-08T20:32:08.935828+00:00","url":"https://bounty.xe.network/XE-0606","body":"# 🐞 Bug Report (Bug bounty — XE Protocol)\r\n\r\n## Summary\r\n\r\nThree mechanisms chain so an attacker can **persistently split the network and force unbounded resync cost**, and no operator action sticks:\r\n\r\n1. **Peer admission is unauthenticated** — `net/netcheck.go:356-364`: `network_id` is a self-reported, unauthenticated string; `net/netcheck.go:366` — the genesis-hash comparison fires **only when both sides advertise one**, and the wire field is `genesis_hash,omitempty`. A peer on a junk genesis self-reports the victims' `network_id` and **omits** `genesis_hash` → admitted as \"same network, unknown chain start\".\r\n2. **Bans are volatile** — `net/banstore.go:129-141`: a 4096-entry FIFO with **no security-class retention** (issue #202; fix PRs #208/#238 not merged at HEAD `02e9641`). At the 32 RPS global netcheck limiter, ~4,096 throwaway peer IDs flush every ban — including 24h wrong-network bans — in **~2 minutes**.\r\n3. **Sync amplification** — `net/sync.go:556-580`: each response page is **fully decoded before** the 10,000-block cap is consulted (`:571-577`) and the 10 MiB budget **re-arms per page** (`:563`) → ~1-2 GiB RSS spike per page, repeatable (issue #44 / XE-0023, still live at HEAD).\r\n\r\n## Steps to Reproduce\r\n\r\n1. Boot N attacker nodes on a junk genesis; self-report `network_id: \"<victims' id>\"`, omit `genesis_hash` → admitted to the honest mesh.\r\n2. Their dirty frontiers trigger dirty-flag/resync machinery; honest nodes pull from them; each sync page decodes in full before any cap → repeated multi-GiB RSS spikes. Small nodes OOM; large nodes burn CPU/bandwidth indefinitely.\r\n3. Operators ban the offenders → bans land in the FIFO table. Attacker mints 4,096 throwaway peer IDs → at ~32 RPS netcheck, **all bans flushed in ~2 minutes** (eviction survives restart via `bans.json`).\r\n4. Because admission is unauthenticated and bans are volatile, steps 1-3 repeat indefinitely — **isolation never sticks, the split persists**.\r\n\r\nLive corroboration (all source-verified at HEAD): netcheck omission path, banstore FIFO (no security/floor/retain/protect code exists — grep clean), sync cap ordering.\r\n\r\n## Impact\r\n\r\n- Persistent **split-brain** across the mesh and unbounded **resync resource exhaustion** (OOM for small nodes).\r\n- No single patch closes it: admission auth, ban retention, and sync decode-cap ordering must land **together** — that interlock is why the chain is worth far more than any single bug (each alone is a Medium with a one-line fix; chained, operators cannot mitigate).\r\n- No direct funds loss → High (mesh-wide, persistent availability/integrity).\r\n\r\n## Suggested fix\r\n\r\n- Sign netcheck messages: bind `network_id` + `genesis_hash` to the peer's long-term key; remove `omitempty` from `genesis_hash` and reject omission.\r\n- Add a non-evictable security-ban class with a retention floor + per-IP ban-creation cap (merge/rework #208/#238).\r\n- Enforce the block cap **before** decoding/appending + per-session decode budget (fix #44 ordering).","patch_refs":[],"thread":[{"id":3795,"source":"desk","source_ref":"reply:2537","author":"XE desk","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-0606 and says what differs; it is read like any other.","created_at":"2026-11-14T22:53:53.253898+00:00"}]}