Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Accept splice_init that overdraws the peer's balance

Aperta
#3,385 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
scala

Direzione di ricerca

Start in the SpliceInit handler in Channel.scala (around line 1162), where the splice gates are checked before SpliceAck is sent. Compare the negative fundingContribution with the peer's balance (parentCommitment.remoteCommit.spec.toLocal), the same value InteractiveTxBuilder uses as previousRemoteBalance. Done means an overdrawing splice_init gets a Warning and disconnect instead of an ack, and the splicing tests cover that case.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

BOLT 2 requires the receiver of splice_init to reject a splice-out larger than the sender's balance:

The receiving node:

  • ...
  • If funding_contribution_satoshis is negative and its absolute value is
    greater than the sending node's current channel balance:
    • MUST send a warning and close the connection or send an error
      and fail the channel.

Eclair does not enforce this. When the peer sends splice_init taking out more than its balance, Eclair replies splice_ack and only aborts afterwards. With a peer balance of 6025961469 msat and a contribution of -6025962 sat (531 msat over), Eclair logs accepting splice with remote.in.amount=-6025962 sat, sends splice_ack, then sends tx_abort (invalid funding_amount=0 sat (min=546 sat)).

Where

The SpliceInit handler (Channel.scala:1162) gates the splice only on: the channel being quiescent, the feerate minimum, the previous splice having no unconfirmed RBF attempts, the previous funding tx being confirmed, and the liquidity ads request. It never compares msg.fundingContribution with the peer's balance, so it sends SpliceAck for any contribution.

The overdraw is only caught once InteractiveTxBuilder starts: FundingAmountTooLow or InvalidFundingBalances (nextRemoteBalance < 0.msat) fail the session and Channel.scala:1503 sends tx_abort. Eclair checks its own balance before sending splice_init, but the receiving path has no counterpart.

Impact

Low. No funds at risk: the builder rejects the balance before any input, output or signature is exchanged, and the channel stays open. The peer is asking to take out funds it does not have, which a correct receiver rejects up front; Eclair instead acks, then aborts with tx_abort where BOLT 2 requires a warning or error, wasting a round trip and leaving the channel quiesced longer. This is a spec-compliance / robustness gap.

Fix

In the SpliceInit handler, if msg.fundingContribution is negative and parentCommitment.remoteCommit.spec.toLocal + msg.fundingContribution < 0.msat (the balance InteractiveTxBuilder uses as previousRemoteBalance), send a Warning and disconnect instead of SpliceAck.

Discovery

Found while fuzzing splicing with smite.

Lingua principale
Scala
Stelle
1.3k
Fork
285
Merge medio
20h 22m
PR unite (30g)
28

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ACINQ/eclair

Tutte le issue di ACINQ/eclair

Issue simili

Altre issue su Scala

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.