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

channeld: initialize tx_sigs_allowed on startup

Public commit record

What the developer wrote

Authored by Erick Cestari

73/100 · Adequate
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
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a bug where a setting that controls whether unexpected transaction signatures are allowed was not initialized when the channel daemon starts. If a peer sent such signatures before the channel was fully ready, the program would read an uninitialized value. In practice this usually caused a random, harmless disconnection, but under undefined-behavior detection it was flagged as a serious bug. The fix simply sets the value to false at startup.

Recommended action

Apply the patch. It is a one-line initialization fix with low risk and removes undefined behavior on a network-triggered path. Consider running UBSan/ASan builds in CI against protocol fuzzers to catch similar uninitialized-field issues.

Security signals we found

01

use of uninitialized variable

02

undefined behavior (invalid bool load)

03

network-triggered code path

04

peer-to-peer protocol state machine issue

05

randomized branch outcome in production builds

Risk score

Why this scored 46/100

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