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

hsmd: don't assert that our own locktime is > 0.

Public commit record

What the developer wrote

Authored by Rusty Russell

78/100 · Adequate
hsmd: don't assert that our own locktime is > 0.

By policy, our stub hsmd accepts everything: openingd is supposed to
sort this out (or use VLS for a real HSM implementation!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Config: the node no longer crashes if you set `watchtime-blocks` to 0 (which is fine for testing: don't do this on mainnet!).
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a crash in Core Lightning when a user sets 'watchtime-blocks' to 0. The crash came from an internal safety check (assertion) in the HSM (hardware security module) stub code that rejected a locktime of 0. The fix removes several 'fail fast' assertions in the stub HSM because, by design, that stub is meant to accept everything and let other parts of the code enforce policy. The change is described as safe for testing but not recommended for mainnet.

Recommended action

Treat as a bug-fix commit rather than a security vulnerability. Users should not set watchtime-blocks=0 on mainnet because it reduces the time window for penalty transactions. Operators should ensure they run a validating signer or HSM implementation (e.g., VLS) if they require strict policy enforcement.

Security signals we found

01

Removal of defensive assertions in HSM stub code

02

Crash fix triggered by a configuration value (watchtime-blocks=0)

03

Policy delegation from stub HSM to openingd / external signer

04

Test re-enabled from expected-fail to passing

Risk score

Why this scored 31/100

Our methodology →
Potential impact 8/30
Exploitability 4/25
Stealth signal 3/15
Affected reach 5/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.