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

Multiple bug fixes found by AI scanning (#3346)

Public commit record

What the developer wrote

Authored by Bastien Teinturier

88/100 · Strong
Multiple bug fixes found by AI scanning (#3346)

* Fix 0-fee commitments fee bumping with remote-main

When using 0-fee commitments, if our peer publishes their commitment
and our main output is large enough, we don't need to use a wallet
input to pay RBF fees, we can directly do it using our main output.

However, we didn't take into account the whole package weight when
doing so: this means that there was a balance range where we would
not correctly bump the commit tx to the target feerate.

* Retry transaction publishing on unclassified failures

We classify bitcoind publish failures by substring-matching the RPC
error message. Any rejection that doesn't match any of the RPC error
messages that we know would previously not be retried.

This was dangerous, as it could cause us to abandon a time-sensitive
transaction, which could cause loss of funds. We now eagerly retry
when we cannot classify the RPC publish failure.

* Fix `channel_ready` using invalid musig2 nonce if RBF

We must use `commitments1` instead of `d.commitments` when creating our
`channel_ready` message to ensure that we use the correct musig2 nonce
for taproot channels. Otherwise, if we have multiple RBF attempts and
the ony confirming is *not* the latest one, we will use the wrong nonce.

* Fix out-of-bound array access in payment FSM

Remote failures can be manipulated to trigger an out-of-bound array
access which crashes the payment lifecycle actor.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes four separate bugs in the Eclair Lightning node, all reported as found by AI scanning. Two of the bugs can cause loss of funds: one miscalculates transaction fees when bumping a channel close, and another could abandon time-sensitive transactions on unrecognized Bitcoin RPC errors. A third bug could use the wrong cryptographic nonce after a channel funding RBF, and a fourth could crash the payment actor via a maliciously crafted remote failure message. The commit is a straightforward set of fixes, but it is partial in the sense that it does not include broader hardening beyond the specific bugs identified.

Recommended action

Apply the patch promptly. Nodes running with zero-fee commitments or taproot channels should prioritize this update because of the direct fund-loss scenarios. Operators should monitor transaction publishing logs for repeated retries after unknown bitcoind errors to ensure they do not mask a different operational problem.

Security signals we found

01

Loss-of-funds risk from incorrect RBF fee calculation in zero-fee commitment handling

02

Loss-of-funds risk from abandoning time-sensitive transactions on unrecognized bitcoind RPC errors

03

Invalid MuSig2 nonce usage in channel_ready after RBF for taproot channels

04

Out-of-bounds array access crash in payment FSM from manipulated remote failure index

05

Fixes introduced under title 'Multiple bug fixes found by AI scanning'

Risk score

Why this scored 74/100

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