Accept splice_init that overdraws the peer's balance
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
- Ambito
- blockchain, payments
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_satoshisis negative and its absolute value is
greater than the sending node's current channel balance:
- MUST send a
warningand close the connection or send anerror
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
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ACINQ/eclair
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ACINQ/eclair
Issue simili
-
GeoSeries scale and skew tests fail with pytest 9.2.0Forse già presa @jiayuasu l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Python unit CI fails on Ubuntu 26.04 runnerForse già presa @parthosa l’ha presa oggi. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 83/100
NVIDIA/cudf-spark-tools#2207 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
canton-network/splice#8087 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno