channeld: abort_channels no longer fails a channel with a signed splice
What changed, and why it matters
This fix prevents a user-issued 'abort channels' command from incorrectly failing a Lightning channel when a splice transaction has already been signed. Previously, the code would pass the latest in-flight splice to a routine that aborts it, even after signatures were exchanged, which caused the channel to fail. Now the code checks whether there is an active splice negotiation or quiescent state, and if the splice is already signed it aborts only the negotiation while keeping the signed splice intact.
Treat as a recommended stability and protocol-compliance patch. Node operators running versions with splice support should upgrade to avoid accidental channel failures when using abort_channels during or after a signed splice. No immediate emergency response is indicated, but the fix should be included in the next maintenance release.
Security signals we found
Denial-of-service/availability impact: user-initiated abort could inadvertently fail a funded channel
Protocol compliance fix: avoids sending tx_abort after tx_signatures, which BOLT 2 forbids
State-handling bug in splice negotiation lifecycle
No explicit memory safety, cryptographic, or remote-exploitation signal
Evidence from the diff
In channeld.c’s handle_abort_req(), the previous implementation always called splice_abort(peer, last_inflight(peer), …) when a user requested abort. If tx_signatures had already been sent for the splice, splice_abort() would fail the channel. The patch adds guards: if neither splicing nor stfu (quiescence) is active, it returns an error without sending tx_abort (which BOLT 2 forbids after tx_signatures). If the last inflight already has i_sent_sigs set, it passes NULL to splice_abort() so only the negotiation is aborted and the signed splice is preserved. This aligns with BOLT 2’s rule that tx_abort must not be sent after tx_signatures.
Changed components
channeld/channeld.chandle_abort_req()splice_abort()splice negotiation / RBF flowstfu (quiescence) handlingInspect captured patch +22 / −1
### channeld/channeld.c
@@ -5264,10 +5264,31 @@ static void handle_stfu_req(struct peer *peer, const u8 *inmsg)
static void handle_abort_req(struct peer *peer, const u8 *inmsg)
{
+ struct inflight *inflight;
+
if (!fromwire_channeld_abort(inmsg))
master_badmsg(WIRE_CHANNELD_ABORT, inmsg);
- splice_abort(peer, last_inflight(peer), "requested by user");
+ /* tx_abort is only for a negotiation, or to leave quiescence: once a
+ * splice is signed we are neither, and the peer may be sending us
+ * updates that splice_abort() would throw away. */
+ if (!peer->splicing && !is_stfu_active(peer)) {
+ wire_sync_write(MASTER_FD,
+ take(towire_channeld_splice_state_error(NULL,
+ "No splice negotiation to abort")));
+ return;
+ }
+
+ /* BOLT #2:
+ * A sending node:
+ * - MUST NOT have already transmitted `tx_signatures`
+ */
+ /* So keep a splice we have signed: abort only this negotiation. */
+ inflight = last_inflight(peer);
+ if (inflight && inflight->i_sent_sigs)
+ inflight = NULL;
+
+ splice_abort(peer, inflight, "requested by user");
}
static void peer_in(struct peer *peer, const u8 *msg)Why this scored 54/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.