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

Apply the unfunded channel peer limit to all unaccepted channels

Public commit record

What the developer wrote

Authored by Matt Corallo

73/100 · Adequate
Apply the unfunded channel peer limit to all unaccepted channels

If a peer floods us with channel requests, we previously failed to
enforce `MAX_UNFUNDED_CHANNEL_PEERS` as we considered the peer to
have some channels once it has more than one request pending.

Instead, we have to make sure we reject such channels by looking
at pending channels as well.

Co-Authored-By: Claude <noreply@anthropic.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a rate-limiting bug in the Lightning Dev Kit (LDK) that let a single peer bypass the cap on how many different peers can have unfunded (not-yet-funded) channels open. Previously, if a peer sent multiple channel requests quickly before any were accepted, LDK counted the peer as already 'having channels' and stopped enforcing the peer limit. The fix checks whether the peer actually has any funded channels, not just any channel requests pending, before allowing a new inbound channel.

Recommended action

Apply the patch. Operators running LDK nodes that accept inbound channels should upgrade to a release containing this fix to prevent a single peer from exhausting the unfunded-channel peer quota and blocking legitimate inbound channel requests.

Security signals we found

01

Denial-of-service resource exhaustion via rapid inbound channel open requests

02

Logic error in rate-limiting condition

03

Regression test added for the bypass scenario

04

Resource limit bypass due to stale state assumption

Risk score

Why this scored 69/100

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