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

Merge PR 'release utxos from failed splices' (#4973)

Public commit record

What the developer wrote

Authored by jkczyz

81/100 · Strong
Merge PR 'release utxos from failed splices' (#4973)

from release-utxos into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4973
Reviewed-by: jkczyz <jkczyz@noreply.git.rust-bitcoin.org>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This change fixes a wallet bookkeeping problem in rust-lightning's built-in coin-selection wrappers. Previously, when a splice attempt failed or coin selection errored after picking UTXOs, those UTXOs stayed marked as 'reserved' in memory and could not be selected again, even though they were no longer actually being used. The patch adds a release_utxos method that callers must invoke when a funded transaction is discarded, and also releases UTXOs automatically if selection fails partway through. Without the fix, a user's wallet could appear to run out of spendable funds after failed splices or selection errors.

Recommended action

Developers using Wallet/WalletSync should review their Event::DiscardFunding handling and call release_utxos with the discarded inputs. Users relying on custom CoinSelectionSource/CoinSelectionSourceSync implementations are unaffected but should ensure their own wallet reserves UTXOs correctly. Consider backporting to release branches that include splicing support.

Security signals we found

01

Resource exhaustion / denial-of-service via permanent in-memory UTXO reservation

02

Incorrect state tracking in coin-selection wrapper

03

New API method required for correct lifecycle management (release_utxos)

04

Error-path cleanup added to prevent stale locks

05

Splicing-specific abort path covered by new test

Risk score

Why this scored 47/100

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