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

Check splice contributions against SignedAmount::MAX_MONEY

Public commit record

What the developer wrote

Authored by Jeffrey Czyz

78/100 · Adequate
Check splice contributions against SignedAmount::MAX_MONEY

Splice contributions should never exceed the total bitcoin supply. This
check prevents a potential overflow when converting the contribution
from sats to msats. The commit additionally begins to store the
contribution using SignedAmount.
✓ Specific, 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 potential integer overflow in the experimental splicing feature of the Lightning Dev Kit. When a user or peer tried to splice a channel with a contribution larger than the total Bitcoin supply (about 21 million BTC), the code could overflow while converting the amount from satoshis to millisatoshis. The patch adds explicit checks that reject contributions above SignedAmount::MAX_MONEY and begins storing contributions using the safer SignedAmount type instead of raw i64 values. The bug is only reachable through the still-experimental splicing code path.

Recommended action

Treat this as a security-relevant hardening fix for the experimental splicing feature. Users building from source should update to a revision containing this commit. Because splicing is still behind a feature flag and not yet productionized, broad immediate impact is limited, but downstream integrators testing splicing should apply the patch promptly.

Security signals we found

01

Integer overflow prevention in satoshi-to-millisatoshi conversion

02

Input validation against MAX_MONEY for splice contributions

03

Type migration from raw i64 to SignedAmount for monetary values

04

Defense-in-depth: debug_asserts plus runtime error returns

Risk score

Why this scored 60/100

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