From 65a1fc81a5363e1e39486bec783004d19e965486 Mon Sep 17 00:00:00 2001 From: Erick Cestari Date: Tue, 8 Sep 2026 14:45:29 -0300 Subject: [PATCH] channeld: initialize tx_sigs_allowed on startup peer->tx_sigs_allowed was only set in peer_reconnect() and when we receive channel_ready, so on a fresh channeld start a stray tx_signatures arriving before the peer's channel_ready made handle_unexpected_tx_sigs() read an uninitialized bool. UBSan flags this as a load of an invalid bool value, and in normal builds the "warn and disconnect" branch was effectively taken at random. Default it to false: we only allow an unexpected tx_signatures when reconnecting. Changelog-None --- channeld/channeld.c | 1 + 1 file changed, 1 insertion(+) diff --git a/channeld/channeld.c b/channeld/channeld.c index eaf4efea0a97..f069c546d617 100644 --- a/channeld/channeld.c +++ b/channeld/channeld.c @@ -7032,6 +7032,7 @@ int main(int argc, char *argv[]) peer->commit_timer = NULL; peer->from_master = msg_queue_new(peer, true); peer->shutdown_sent[LOCAL] = false; + peer->tx_sigs_allowed = false; peer->shutdown_wrong_funding = NULL; peer->last_update_timestamp = 0; peer->last_empty_commitment = 0;