<!-- XE-16484 · Inbound sync handler CPU DoS: per-peer cooldown limiter bypassable with unlimited peer IDs; no concurrency cap on inbound sync streams · testnet -->
*Markdown view of <https://bounty.xe.network/XE-16484>. The page is the record; this is the same page for reading.*

XE-16484 · Bounty

# Inbound sync handler CPU DoS: per-peer cooldown limiter bypassable with unlimited peer IDs; no concurrency cap on inbound sync streams

Closed · duplicate
—
web
filed 2026-11-17 01:57 UTC
by xe:a2b14c2a

Verdict
:   Duplicate

Tier
:   —

Claimed
:   —

Area
:   P2P / sync

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-22 23:26 UTC

Told
:   2026-11-22 23:26 UTC

### Patches

None linked.

### History

- [769950](https://bounty.xe.network/log/769950) 2026-11-22 23:26 UTC proposal.adopted
- [769949](https://bounty.xe.network/log/769949) 2026-11-22 23:26 UTC reply.sent
- [769948](https://bounty.xe.network/log/769948) 2026-11-22 23:26 UTC ticket.status new → closed
- [768985](https://bounty.xe.network/log/768985) 2026-11-22 23:25 UTC proposal.adopted
- [768984](https://bounty.xe.network/log/768984) 2026-11-22 23:25 UTC ticket.facts area
- [768983](https://bounty.xe.network/log/768983) 2026-11-22 23:25 UTC proposal.adopted
- [768982](https://bounty.xe.network/log/768982) 2026-11-22 23:25 UTC ticket.facts
- [768981](https://bounty.xe.network/log/768981) 2026-11-22 23:25 UTC proposal.adopted
- [768980](https://bounty.xe.network/log/768980) 2026-11-22 23:25 UTC ticket.facts
- [766445](https://bounty.xe.network/log/766445) 2026-11-22 23:17 UTC note.added
- [766438](https://bounty.xe.network/log/766438) 2026-11-22 23:17 UTC proposal.created
- [766437](https://bounty.xe.network/log/766437) 2026-11-22 23:17 UTC proposal.created

[Full history](https://bounty.xe.network/log?ref=XE-16484) · [JSON](https://bounty.xe.network/v1/tickets/XE-16484) · [markdown](https://bounty.xe.network/XE-16484.md)

### Report

Severity: High (Node/API, DoS)

File: net/sync.go

The inbound sync stream handler (net/sync.go:401-408) is only gated by inboundRL.allow(s.Conn().RemotePeer()) — a per-peer cooldown (syncRateLimiter, net/sync.go:62-77). There is no concurrency cap on inbound streams: syncRounds.slots (maxConcurrentSyncRounds\=4, net/sync.go:34,88) only limits outbound resync rounds, not inbound handlers. libp2p runs the handler per stream.

An attacker trivially generates unlimited ed25519 keypairs, so unlimited distinct peer IDs, each bypassing the per-peer cooldown. Each accepted stream runs handleSyncStream (net/sync.go:540) which:

1. calls frontiersWhereServerIsBehind (net/sync.go:608) over up to maxFrontiers\=50000 remote frontiers (net/sync.go:44), and
2. for each frontier calls ledger.GetBlockHeight (net/sync.go:618 / core/ledger.go:3378) — chainHashes fetches the full account chain and then linearly scans hashes for the target.

Cost per request is O(frontiers x chain length). Flooding sync streams from many peer IDs keeps node CPU saturated at \~100% and can stall block processing. Because the limiter map cleanup loop (net/sync.go:67-71) also holds the limiter mutex while iterating every tracked peer, the flood additionally serializes on this mutex.

Suggested fix: add a global inbound sync concurrency cap (semaphore) plus a global token-bucket rate limit independent of peer identity, and bound work per handler (e.g. early-exit after N expensive GetBlockHeight calls, or memoize chain hashes).

### Thread

**Joseph Denne**team2026-11-22 23:26 UTCdesk

Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the
first verifiable submission, so this one closes as a duplicate. If you believe it is a different
bug, file a new report that links https://bounty.xe.network/XE-16484 and says what differs; it is read like any other.
