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

Merge PR 'Reject RAA before our commitment_signed has been sent' (#5561)

Public commit record

What the developer wrote

Authored by Matt Corallo

81/100 · Strong
Merge PR 'Reject RAA before our commitment_signed has been sent' (#5561)

from auto-pr-bot/bot/345-raa-before-our-commitment_signed-94d9f9 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5561
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in the Lightning Dev Kit where a node could incorrectly accept a 'revoke_and_ack' message from its counterparty before it had actually sent out a new commitment transaction. Under the right timing conditions, this could cause the node to sign a commitment that its own channel monitor had never been told about, potentially leaving it unable to recover funds or claim HTLCs if that commitment later confirmed on-chain. The fix adds extra state checks so the node rejects such premature messages and closes the channel instead.

Recommended action

Upgrade to a rust-lightning release containing this commit. Nodes running versions without this fix are at risk of signing commitments not tracked by their ChannelMonitor if a counterparty sends a premature revoke_and_ack during async signing or monitor persistence delays. Operators relying on async signers or slow monitor persistence should prioritize this patch.

Security signals we found

01

State-machine validation bug in Lightning channel protocol handling

02

Potential ChannelMonitor desynchronization leading to inability to claim HTLCs on revoked/confirmed commitment

03

Premature acceptance of revoke_and_ack before commitment_signed transmission

04

Regression tests added for both monitor-pending and async-signer pending paths

05

Channel closure now enforced instead of accepting invalid protocol transition

Risk score

Why this scored 68/100

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