gossip: Don’t reset channel on stale annoncement
What changed, and why it matters
This change fixes a minor operational bug in Core Lightning's gossip handling. Previously, when a stale channel announcement arrived after a channel was spliced (a process that spends the original funding output), the software treated it as a warning and reset the peer connection. The patch downgrades this to a simple log/trace message and ignores the stale announcement, which matches the Lightning specification. This is a stability improvement, not a security vulnerability fix.
No immediate security action required. This is a routine patch improving node stability and spec compliance. Operators should upgrade as part of normal maintenance.
Security signals we found
Change removes peer connection reset on malformed/stale gossip message
Downgrades warning to trace log
Behavior aligns with Lightning spec: ignore stale channel announcements
Evidence from the diff
In gossipd/gossmap_manage.c, the function gossmap_manage_handle_get_txout_reply previously called peer_warning() and reset the peer connection when a channel_announcement referenced a spent txout. The patch changes this to status_peer_trace() and removes the peer reset behavior. The commit explains this occurs legitimately during splicing, where the original funding output is spent, causing stale announcements. The BOLT spec says such messages should be ignored.
Changed components
gossipd/gossmap_manage.cgossmap_manage_handle_get_txout_reply functionInspect captured patch +8 / −1
diff --git a/gossipd/gossmap_manage.c b/gossipd/gossmap_manage.c
index 385cd66..3210f31 100644
--- a/gossipd/gossmap_manage.c
+++ b/gossipd/gossmap_manage.c
@@ -743,7 +743,14 @@ void gossmap_manage_handle_get_txout_reply(struct gossmap_manage *gm, const u8 *
* UTXOs. */
static struct timemono prev;
if (time_greater(timemono_since(prev), time_from_sec(1))) {
- peer_warning(gm, pca->source_peer,
+ /* Splices that happen soon after a channel open can result in
+ * the receiving of stale channel announcement (Splice spends
+ * the txout of the original channel).
+ *
+ * We used to treat this as a warning and reset the peer
+ * connection but the spec simply says "ignore the message". So
+ * Now we just ignore these stale channel announcements. */
+ status_peer_trace(pca->source_peer,
"channel_announcement: no unspent txout %s",
fmt_short_channel_id(tmpctx, scid));
prev = time_mono();
Why this scored 20/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.