AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 50 Bitcoin

gossipd: put common size restrictions on all maps.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
gossipd: put common size restrictions on all maps.

We already limited pending_ann_map and early_ann_map to 10,000 entries:
do the same for pending_nannounces, pending_cupdates and early_cupdates.

Add CI_UNEXPECTED so CI gets upset if this happens unexpectedly.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This change adds size caps to internal queues in the Lightning node's gossip subsystem, mirroring limits that already existed for some maps. It is a hardening/DoS-prevention patch: without limits, an attacker could potentially flood the node with gossip messages and consume unbounded memory. The patch also adds a CI_UNEXPECTED marker so the continuous-integration system flags unexpected flooding. There is no direct evidence in the commit of an active exploit or a specific vulnerability being fixed beyond resource-exhaustion risk.

Recommended action

Treat as a defensive hardening patch. Review whether 10,000 is an appropriate limit under adversarial load and ensure CI_UNEXPECTED alerts are monitored. No immediate emergency response is warranted absent evidence of an active exploit, but operators should upgrade in due course to reduce DoS surface.

Security signals we found

01

Resource-exhaustion/DoS hardening: unbounded queues now have a common size cap

02

Flooding detection: status_unusual_once warnings with CI_UNEXPECTED for unexpected queue overflow

03

Memory-management fix: tal_free_if_taken on dropped TAKES parameters to avoid leaks

04

Consistency: applies existing 10,000-entry limit pattern to additional maps

Risk score

Why this scored 50/100

Our methodology →
Potential impact 12/30
Exploitability 10/25
Stealth signal 8/15
Affected reach 10/15
Confidence 7/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.