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

discovery: fix gossiper shutdown deadlock

Public commit record

What the developer wrote

Authored by Matt Morehouse

78/100 · Adequate
discovery: fix gossiper shutdown deadlock

When processing a remote network announcement, it is possible for two
error messages to be sent back on the errChan. Since Brontide doesn't
actually read from errChan, and since errChan only buffered one error
message, the sending goroutine would deadlock forever. This would only
become apparent when the gossiper attempted to shut down and got hung
up.

For now, we can fix this simply by buffering up to two error messages on
errChan. There is an existing TODO to restructure this logic entirely
to use the actor model, and we can do a more thorough fix as part of
that work.

This bug was discovered while doing full node fuzz testing and was
triggered by sending a specific channel_announcement message and then
shutting down LND.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a deadlock bug in LND's gossip message handler. When a malformed channel announcement was processed, two error messages could be sent on a channel that only had room for one. Because some callers never read from that channel, the second send would block forever. This prevented LND from shutting down cleanly. The fix simply increases the channel buffer from 1 to 2. The bug was found during fuzz testing and is not described by the vendor as a security vulnerability.

Recommended action

Treat as a reliability/DoS-hardening fix rather than a critical security vulnerability. Apply the patch and monitor for the planned actor-model refactor referenced in the TODO. Operators concerned about clean shutdown should upgrade; no immediate exploit requiring emergency response is evident from the commit alone.

Security signals we found

01

Denial-of-service via shutdown deadlock

02

Malformed P2P gossip message triggers stuck goroutine

03

No authentication or rate-limiting bypass evident

04

Fix is a minimal buffer-size workaround, not a structural redesign

Risk score

Why this scored 40/100

Our methodology →
Potential impact 8/30
Exploitability 7/25
Stealth signal 6/15
Affected reach 8/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.