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

splice: RPC error handling fix

Public commit record

What the developer wrote

Authored by Dusty Daemon

80/100 · Strong
splice: RPC error handling fix

Splice commands can fail because of external reasons, for example our peer rejecting the splice. These external reasons eat the active `splice_command` so we need to stop storing the `splice_command` in callbacks and instead pull it from the `splice_commands` list which automatically removes the object when its consumed.

This corrects a lightningd crash under certain RPC circumstances.

Changelog-None
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This patch fixes a crash in Core Lightning's lightningd daemon that could occur during splice-related RPC operations. The root cause was that splice command state could be consumed by external failures (like a peer rejecting the splice) while callbacks still held a stale pointer to it. The fix stops storing the splice command pointer inside callback data structures and instead looks it up fresh from the active list when needed, avoiding use-after-free-style crashes.

Recommended action

Apply the patch. Operators running nodes that expose splice RPCs should upgrade. The crash is triggered by external failure conditions, so it is not directly exploitable by an unauthenticated attacker, but a malicious peer may be able to influence splice rejection timing.

Security signals we found

01

Use of stale pointer to freed command object in async callbacks

02

Daemon crash (DoS) under specific RPC/splice error conditions

03

Memory management fix involving tal_steal removal and dynamic lookup

04

Null-deref protection added for error message formatting path

Risk score

Why this scored 51/100

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