Skip to content

node: the DHT routing table admits unbonded node IDs and evicts the oldest entry #2708

Closed

Description

@thiras

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.rs seed_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

  1. added
    kind:security
    prio:high
    area:node
    area:protocol
    on Oct 28, 2026
  2. added this to the v0.3 milestone on Oct 28, 2026
  3. self-assigned this
    on Oct 28, 2026
  4. moved this from Backlog to In progress in deCDNon Oct 28, 2026
  5. moved this from In progress to Done in deCDNon Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodearea:protocolkind:securityprio:high

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions