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

channeld: tell lightningd the HTLC sigs for a splice's first commitment

Public commit record

What the developer wrote

Authored by jaonoctus

78/100 · Adequate
channeld: tell lightningd the HTLC sigs for a splice's first commitment

Every commitment the peer signs comes with its signatures for our HTLC
transactions, and lightningd stores them so onchaind can spend the HTLC
outputs if we close with that commitment. For a splice, got_commitsig
stores them for each inflight on every later commitment update, but the
inflight's first commitment, signed during the splice negotiation itself,
goes to lightningd in channeld_update_inflight, which only carried the
commitment and its signature. So any HTLC already pending when the splice
was negotiated had no signature stored for the splice's commitment.

That matters once the channel moves onto that commitment: after
splice_locked, wallet_htlcsigs_confirm_inflight() promotes the inflight's
stored sigs, which then lack those HTLCs, and the same goes for a close on
a splice which confirmed before splice_locked.

Add them to channeld_update_inflight, sent whenever it carries a new
commitment, and have lightningd replace that inflight's stored sigs with
them. channeld_update_inflight could be resent with the commitment
lightningd already had when the user signs the splice; that now sends no
commitment, so it can't replace those sigs with nothing.

Changelog-None

Co-Authored-By: Ken Sedgwick <ken@bonsai.com>

(cherry picked from commit ebf69a8e6ba29560584060304bfe4a1e2b75dd52)
✓ 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 patch fixes a bug in Core Lightning's channel splicing feature. When a Bitcoin Lightning channel is being spliced (a fancy way of resizing the channel while it stays open), the software was forgetting to save the peer's signatures for any pending HTLC payments on the very first version of the new commitment transaction. If the channel later closed using that commitment, the node might not be able to claim its funds from those pending payments on the blockchain, potentially leading to loss of money. The fix makes sure those signatures are passed along and stored in the wallet database.

Recommended action

Apply the patch. Nodes that support Lightning channel splicing should upgrade, especially if they handle HTLCs across splice operations. Monitor for any on-chain close scenarios involving pending HTLCs during a splice and verify HTLC signature storage completeness.

Security signals we found

01

Missing cryptographic material (HTLC signatures) for a commitment transaction

02

Potential inability to spend HTLC outputs on channel close or splice lock

03

Funds-at-risk scenario for pending HTLCs during a splice

04

Patch adds persistence of HTLC signatures for splice inflight commitments

05

Changelog-None: vendor did not flag security relevance in commit message

Risk score

Why this scored 64/100

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