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

Merge PR 'Make custom signers verify holder commitment sigs synchronously' (#5616)

Public commit record

What the developer wrote

Authored by Matt Corallo

91/100 · Strong
Merge PR 'Make custom signers verify holder commitment sigs synchronously' (#5616)

from bot/5611-funding-tx-broadcast-on-invalid-c2b5de into main

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

What changed, and why it matters

This commit hardens how Lightning Dev Kit handles custom signing modules. Previously, LDK relied on each custom signer to check that the other party's signatures on a holder commitment transaction were valid. The change adds a ready-made verification helper and updates the documentation to make clear that signers must do this check synchronously before returning success, because LDK may immediately broadcast the funding transaction or use the commitment on force-close. It also makes LDK's built-in signer verify that the holder funding key in the channel parameters actually belongs to it before trusting signatures. The commit is defensive: it reduces the chance that a buggy or malicious custom signer accidentally accepts invalid signatures and lets LDK act on them.

Recommended action

Treat as a security-hardening fix. Projects using custom ChannelSigner implementations should review their validate_holder_commitment to ensure it now verifies counterparty_sig and counterparty_htlc_sigs synchronously before returning Ok(()). Consider backporting to maintained release branches, especially if custom signers are supported. No immediate emergency response is indicated because the patch itself is the fix, but the pre-patch behavior created a contract gap that could lead to invalid transactions being broadcast.

Security signals we found

01

New synchronous signature-verification helper for holder commitment transactions

02

Trait documentation now mandates verification before Ok(()) because LDK acts immediately

03

InMemorySigner now validates that holder funding key belongs to signer before signature checks

04

Tests added for corrupted commitment signature, corrupted HTLC signature, and missing HTLC signature

05

Pending changelog frames change as API update with security-relevant contract

Risk score

Why this scored 70/100

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