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

closingd: fail the negotiation when lightningd rejects the peer's closing fee

Public commit record

What the developer wrote

Authored by Ken Sedgwick

73/100 · Adequate
closingd: fail the negotiation when lightningd rejects the peer's closing fee

lightningd's reply to closingd_received_signature carried only a txid.
closingd used it for the billboard and went on to agree to the offer,
so when lightningd had rejected the fee the close still completed and
drop_to_chain broadcast last_tx, which was still the commitment, while
the close command reported a mutual close.

Add the verdict to the reply. On a rejection lightningd logs it at
UNUSUAL, and closingd sends the peer a warning and exits instead of
agreeing, the same way it handles a fee range with no overlap. The
channel stays in CLOSINGD_SIGEXCHANGE: negotiation restarts on
reconnect with lightningd's current bounds, and the close command's
timeout decides when to close unilaterally.

Changelog-Fixed: lightningd: a closing fee lightningd rejects fails the negotiation instead of broadcasting the commitment as a mutual close.
(cherry picked from commit a944bebef3a95602b660444828882fc583241401)
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This fix repairs a bug in Core Lightning's channel-closing handshake. Previously, when the node rejected a peer's proposed closing fee, the rejection was not communicated back to the sub-process that negotiates with the peer. That sub-process would still treat the close as agreed and could broadcast the old commitment transaction while the user interface reported a successful mutual close. The patch adds an explicit 'acceptable' flag to the internal reply so the negotiation is aborted and the peer is warned instead of proceeding with a mismatched transaction.

Recommended action

Treat this as a security-relevant bug fix and include it in release notes. Users running mutual-close logic should upgrade. Review other subdaemon wire replies that carry implicit 'continue' semantics to ensure they include explicit verdicts where needed.

Security signals we found

01

State inconsistency between closingd and lightningd during mutual close

02

Rejected closing fee could still lead to broadcasting the commitment transaction

03

User-visible close status ('mutual close') did not match on-chain behavior

04

Internal wire protocol reply lacked a verdict field, causing a logic bypass

05

Fix includes regression test removal of xfail marker

Risk score

Why this scored 68/100

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