Repository navigation
fix(webrtc): cap remote addresses per ufrag - #3500
Merged
Merged
Conversation
ICE sessions advertise a small, bounded number of candidates per IP family. Track at most 32 remote addresses per (ufrag, family) so the udpmux bookkeeping stays predictable for long-lived listeners. Past the cap, additional candidates still resolve to the existing muxed connection but no longer extend addrMap or ufragAddrMap.
lidel
marked this pull request as ready for review
May 6, 2026 20:25
sukunrt
approved these changes
May 11, 2026
7 tasks
gammazero
added a commit
to ipni/go-libipni
that referenced
this pull request
Jul 29, 2026
The update to `go-libp2p` 0.49.0 update contains security fixes and enhancements for DoS/hardening: - fix for CVE-2026-57497: GHSA-g35j-m5xg-vh3q - [3501](libp2p/go-libp2p#3501) bounds protocols accepted per peer in identify (a peer could plant 1800+ protocol entries in your peerstore via chunked identify) - [3486](libp2p/go-libp2p#3486) caps unconnected addrs per peer (stops DHT gossip flooding the peerstore with stale addrs; relevant to us) - [3500](libp2p/go-libp2p#3500) caps webrtc remote addrs per ufrag - [3487](libp2p/go-libp2p#3487) evicts stale certified addrs when a newer signed peer record drops them (an address a peer once advertised no longer lingers after removal)
gammazero
added a commit
to ipni/go-libipni
that referenced
this pull request
Jul 30, 2026
The update to `go-libp2p` 0.49.0 update contains security fixes and enhancements for DoS/hardening: - fix for CVE-2026-57497: GHSA-g35j-m5xg-vh3q - [3501](libp2p/go-libp2p#3501) bounds protocols accepted per peer in identify (a peer could plant 1800+ protocol entries in your peerstore via chunked identify) - [3486](libp2p/go-libp2p#3486) caps unconnected addrs per peer (stops DHT gossip flooding the peerstore with stale addrs; relevant to us) - [3500](libp2p/go-libp2p#3500) caps webrtc remote addrs per ufrag - [3487](libp2p/go-libp2p#3487) evicts stale certified addrs when a newer signed peer record drops them (an address a peer once advertised no longer lingers after removal)
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Kubo's default
Addresses.Swarmincludes/ip4/0.0.0.0/udp/4001/webrtc-direct,we should cap this to protect long running nodes.
IIUC this is high enough to never impact real STUN operations, but low enough to make certain fun activities unfeasible.
Why reject-new instead of FIFO or LRU
FIFO or LRU would let fresh STUN packets evict known-good
addrMapentries. Reject-new keeps tracked addresses stable, no real peer should eat up more than 32.Note
Filed as part of Kubo maintenance: