You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
node: the DHT routing table admits unbonded node IDs and evicts the oldest entry #2708
Source: GHSA-7vj5-798g-vp3j (H8, internal audit at 772c8f4, re-confirmed on main).
ADR 022 restricts the DHT routing pool to bonded operators, but the routing table admits any node ID:
note_peer_seen (crates/node/src/handlers/dht.rs:369-380) inserts every inbound peer with no stake check.
dht/bucket_refresh.rs:216-221 and dht/bootstrap.rs:157-166 insert the closer_nodes from responses unchecked. Only the bootstrap seed insert uses the staker set.
RoutingTable::insert (dht/routing.rs:208-211) evicts the least-recently-seen entry unconditionally when a bucket is full.
Publish targets (dht/publish.rs:1097,1192), lookup seeds (dht/lookup.rsseed_from) and the FindNode answer to other peers (handlers/dht.rs:733-743) read the table unfiltered.
Stake is checked only for Store/BatchStore holder admission and when lookups fold their responses. Cheap Sybil IDs can therefore displace bonded peers. Publish fan-out and lookup seeds then go to non-participants, and DHT discovery of a hash degrades to the on-chain directory fallback.
Gate every routing-table insert on staker_set.is_active
Filter publish targets, lookup seeds and FindNode answers by stake
Prefer long-lived entries: ping the oldest entry before evicting it
Test: unbonded peers that contact the node do not displace bonded entries
Activity
fix(node): refresh only bonded DHT entries; review follow-ups for #2708