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

lnworker: limit max number of incoming channel-less peers

Public commit record

What the developer wrote

Authored by SomberNight

50/100 · Thin
lnworker: limit max number of incoming channel-less peers
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit adds a cap on how many incoming Lightning Network peers without channels can connect to an Electrum node at once. Before this change, an attacker could potentially open unlimited incoming peer connections, consuming memory, CPU, and network resources and possibly disrupting normal operation. The fix limits such peers to 100 and closes new connections once that limit is reached. It also fixes a related bug where an existing initialized peer connection was not being closed when a duplicate arrived.

Recommended action

Treat this as a security hardening / DoS mitigation patch. Users running Electrum Lightning nodes should upgrade to a version containing this commit. Monitor for follow-up improvements such as IP-based slot accounting mentioned in the TODO.

Security signals we found

01

Unbounded resource consumption by incoming channel-less peers mitigated by a hard limit

02

Connection tracking set added to enforce per-state limit

03

New connections over the limit are closed immediately

04

Duplicate initialized peer transport now closed instead of leaked

05

Code comments discuss attacker-driven slot exhaustion and self-DoS trade-offs

Risk score

Why this scored 62/100

Our methodology →
Potential impact 14/30
Exploitability 15/25
Stealth signal 10/15
Affected reach 12/15
Confidence 7/10
Evidence quality 4/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.