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

Reject RGS snapshots that leave our graph absurdly-sized

Public commit record

What the developer wrote

Authored by Matt Corallo

78/100 · Adequate
Reject RGS snapshots that leave our graph absurdly-sized

If an RGS server sends snapshots that are absurdly-sized, they can
bloat a client's network graph, eventually leading to an OOM. While
we generally consider RGS servers to be semi-trusted (at least in
the sense that they can often simply not respond and leave a client
unable to find paths) we should still avoid allowing them to OOM a
client.

Thus, here, we naively start ignoring new channels from an RGS
server if they leave our graph 10x larger than we expect. This at
least avoids the OOM even if we end up not being able to make
payments.

Reported by Jordan Mecom of Block's Security Team
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a denial-of-service weakness in Lightning Dev Kit's rapid gossip sync feature. A malicious or compromised RGS server could send an enormous snapshot of Lightning network data, causing a user's node to allocate so much memory that it crashes with an out-of-memory (OOM) error. The patch now rejects snapshots with absurdly high node counts and stops adding new channels once the graph grows about 10 times larger than expected. The issue was reported by Jordan Mecom of Block's Security Team.

Recommended action

Treat this as a security hardening fix and include it in the next maintenance release. Users relying on RGS should upgrade to avoid OOM DoS from a compromised or malicious RGS server. No immediate incident response is required unless an untrusted RGS source is in use.

Security signals we found

01

OOM/DoS mitigation for semi-trusted gossip data source

02

Input-size bounds added to RGS snapshot parsing

03

Explicit security framing in commit message and doc comments

04

External security report credited (Block's Security Team)

05

Constants made pub(crate-visible) to support enforcement

Risk score

Why this scored 74/100

Our methodology →
Potential impact 22/30
Exploitability 18/25
Stealth signal 8/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.