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

lnpeer: channel_reestablish: further restrict states for msg handler

Public commit record

What the developer wrote

Authored by SomberNight

73/100 · Adequate
lnpeer: channel_reestablish: further restrict states for msg handler

re REQUESTED_FCLOSE and WE_ARE_TOXIC (as per f321x):
> There is no reason for the peer to send channel_reestablish after we
> have sent the force close request (error) and I assume we don't
> want to give surface to the peer to attempt finding out if we really lost state?

re FORCE_CLOSING:
the peer might not have realised we started force-closing but we probably don't want to run the message-handler even in that case
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit tightens when Electrum's Lightning code accepts a 'channel_reestablish' message from a peer. Previously, the message was dropped only if the channel was already CLOSED or later; now it is also dropped while the channel is in the process of force-closing (FORCE_CLOSING, REQUESTED_FCLOSE, WE_ARE_TOXIC). The change is defensive: it reduces the chance a peer could probe or confuse Electrum during a force-close. The patch is a one-line threshold change and does not by itself fix a known exploit.

Recommended action

Treat as a defensive hardening patch. Review whether additional channel messages (not just channel_reestablish) should be similarly restricted during force-close states, and ensure the state machine cannot be coerced into unsafe transitions by a peer before reaching FORCE_CLOSING.

Security signals we found

01

state-machine hardening for Lightning channel reestablishment

02

peer message ignored during force-close transitions

03

defensive reduction of attack surface during close

04

no explicit vulnerability or CVE referenced in commit

Risk score

Why this scored 46/100

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