新云社 reports: This week’s newsletter summarizes the disclosure of two denial-of-service vulnerabilities in older versions of Eclair and introduces a proposal for running complex multi-round contracts within Lightning channels. It also includes our regular sections: announcements of new releases and release candidates, and notable changes in popular Bitcoin infrastructure software.
News
-
● Disclosure of two DoS vulnerabilities fixed in Eclair v0.14.1: Erick Cestari posted on Delving Bitcoin a responsible disclosure of two denial-of-service (DoS) vulnerabilities in the channel opening flow of Eclair v0.14.0 and earlier. Both were fixed in Eclair #3324 and released with v0.14.1 in July; users still running older versions should upgrade.
The first vulnerability, discovered by Matt Morehouse using his fuzzing tool smite, is a race condition in the check for duplicate
temporary_channel_id. Before accepting anopen_channelmessage, Eclair checks whether the ID is already in use, but it does not record the new channel until a later step. Thus, an attacker sending multiple identicalopen_channelmessages in quick succession could get two of them past the check. Eclair would then create two channel states for the same ID, with the second replacing the first, leaving an inaccessible channel state that occupies about 25 kB of memory until the peer disconnects. Repeatedly executing this attack leaks about 1 MB of memory per second until the node runs out of memory or spends all CPU time on garbage collection.The second vulnerability, discovered by Cestari, bypasses Eclair’s limit on the number of pending channels with unconfirmed funding transactions. The duplicate check only looks at the temporary ID, so an attacker can start opening a channel and then use that channel’s final
channel_idas thetemporary_channel_idfor the nextopen_channel. The limiter counts the reused ID twice, and when the new channel obtains its final ID, it removes two entries. Thus, pending channels can grow indefinitely while the count never exceeds two. Each pending channel stores a copy of the peer’sinitfeatures; setting an unknown odd feature bit at a very high position can inflate this copy to about 65 kB. In Cestari’s test, a single connection with no on-chain overhead could exhaust a node’s 4 GB of memory in about 48 minutes. Because pending channels are written to the database, the node will crash again on every restart until the memory limit is raised or the corresponding database records are manually deleted.In response to a question, Morehouse noted that mobile wallets such as Phoenix that use Eclair nodes as LSPs are not affected, because ACINQ patched its own nodes several months ago.
-
● Off-chain contracts in Lightning channels: Adam Gibson posted to the Bitcoin-Dev mailing list about a protocol proposal called LN-GAP that allows running complex, multi-round two-party contracts within Lightning channels while requiring only a fixed number of transactions to resolve disputes on-chain. To demonstrate the proposal, Gibson implemented a chess game where the winner takes the entire pot; he considers chess difficult to run on-chain and a good example. The proposal has a code repository and a paper available for review.
Two players, Alice and Bob, agree on a set of rules and then make their moves. In case of a dispute, Alice can enforce these rules on-chain. However, Gibson points out that the Lightning Network can enforce rules on published states, but cannot do so when the counterparty stalls or stops responding. To address this, he introduces a witness committee (venue) whose members are responsible for proving whether a signed message (e.g., a chess move and its signature) was published before a certain deadline. The committee only needs to prove whether the publication time meets the requirement, not judge the content of the message. In a dispute, Alice publishes a transaction claiming that Bob did not publish any event; Bob can then publish a second transaction containing counter-evidence (his move and the committee’s witness); finally, Alice can publish a counter-proof showing that Bob’s counter-evidence is invalid because the event does not comply with the rules.
In Gibson’s proposal, the witness committee never holds user funds. It also avoids relying on FROST-style threshold signatures in order to clearly assign fraud liability to the malicious members. To this end, witnessing uses each member’s individual “one-bit signatures,” checked via
OP_CHECKSIGADD. Members are incentivized through fees, which are paid atomically on the channel using adaptor signatures. However, this construction relies on a honest majority assumption. If more than half of the committee members collude with one party to the contract, funds could be stolen.Beyond games, possible applications include proof-of-storage contracts, where a provider loses a deposit if it fails to respond to a challenge, and off-chain dispute resolution, which functions similarly to what BitVMX-style zero-knowledge verifiers do on-chain.
Releases and release candidates
New releases and release candidates of popular Bitcoin infrastructure projects. Please consider upgrading to new releases or helping to test release candidates.
- ● Bitcoin Core 32.0rc4 is a release candidate for the next major version of this mainstream full node implementation. A testing guide is available for reference.
Notable code and documentation changes
The following are recent notable changes from Bitcoin Core, Core Lightning, Eclair, LDK, LND, libsecp256k1, Hardware Wallet Interface (HWI), Rust Bitcoin, BTCPay Server, BDK, Bitcoin Improvement Proposals (BIPs), Lightning BOLTs, Lightning BLIPs, Bitcoin Inquisition, and BINANAs.
-
● Eclair #3396, #3397, and #3400 fix several ways a malicious channel peer could prevent Eclair from claiming HTLCs on-chain during splicing (see newsletter #423). Previously, a peer could choose a very distant absolute locktime, add inputs with relative timelocks, provide non-standard witnesses, exceed standard transaction weight limits, or set the feerate of a signed transaction too low, causing Eclair to sign a splice transaction that could not be published in time. The first PR adds checks for these cases. The second PR makes Eclair retry commitment and penalty transactions that were rejected due to conflicts with unconfirmed transactions, because the peer might later double-spend one of the other inputs of that unconfirmed transaction to replace it via RBF. This retry fix also applies when the channel funding transaction is still unconfirmed, including zero-conf channels. The third PR fixes another gap in the recovery mechanism: if Eclair has already force-closed the channel using a commitment transaction corresponding to a splice variant, and another RBF-replaced version of the same splice later confirms, Eclair now recognizes that the funding transaction has changed and broadcasts a commitment transaction spending the confirmed splice output. Previously, funds could remain locked and HTLCs could not be claimed on-chain.
-
● Eclair #3399 and #3394 fix two cases where just-in-time (JIT) funding could cause Eclair to pay a downstream peer without collecting the corresponding inbound HTLC (see newsletter #419). Previously, after Eclair stopped tracking an expired payment, a new payment could reuse its payment hash. If the downstream peer later claimed the original outbound HTLC on-chain and revealed the preimage, Eclair might mistakenly claim the inbound HTLC of the new payment instead of the original inbound HTLC, causing the original inbound HTLC to time out while Eclair fails to receive funds. The first PR now checks whether a settlement belongs to a currently tracked payment; if not, it uses the inbound HTLC details retained in the settlement to claim the correct HTLC. The second PR ensures that a funded payment is only forwarded through the channel that purchased liquidity. Previously, Eclair might forward through another channel with the same peer, but when the payment expired, it would only check the funded channel before returning a failure upstream, even though the outbound HTLC on the other channel could still be claimed.
-
● Eclair #3395 fixes a bug where a spender could construct a malformed payment onion with a valid HMAC, causing an inbound HTLC to remain unprocessable. The spender could encode the per-hop payload length as larger than the actual packet capacity while still providing a valid HMAC. Previously, Eclair did not validate this length before extracting the next HMAC, resulting in an uncaught exception. The relay would then resume operation without failing the HTLC; the malformed packet could also prevent the HTLC cleanup process from initializing after a restart. Now, Eclair checks whether the per-hop payload and its HMAC fit within the packet. If not, Eclair returns
InvalidOnionVersion, allowing normal failure handling to proceed. -
● Eclair #3401 fixes a bug that could cause a forwarding node to lose funds after a disconnect. Eclair saves instructions to fulfill or reject an HTLC until the corresponding channel update is signed, so that it can retry after reconnecting. Previously, if a fulfill update had been proposed but not yet signed, Eclair would reject duplicate or conflicting instructions while scheduling the deletion of the originally saved instruction. If the channel disconnected before signing, the unsigned update would be discarded, and no instruction would remain to re-execute the fulfill. Thus, even if the outbound HTLC was fulfilled, the inbound HTLC could still time out. Now, Eclair retains the original instruction until the settlement update is signed.
-
● LDK #5080 fixes a bug where a restart during cooperative channel closure could prevent pending HTLCs from failing back to the upstream peer. Previously, when LDK restarted, it excluded channels undergoing cooperative closure from the lookup table used for HTLC processing, even though these channels might still have unresolved payments. Thus, when a downstream peer failed an HTLC, LDK might mistakenly believe the upstream channel did not exist and drop the failure response. LDK might also drop inbound HTLCs awaiting onion decoding. This could leave HTLCs unprocessable until the upstream peer force-closes the channel at expiry. Now, LDK includes closing channels when restoring the information needed to process existing HTLCs.
-
● LDK #5087 fixes a potential privacy leak when sending onion messages over blinded paths using dummy hops (see newsletter #370). Dummy hops are extra encryption layers processed by the recipient to obscure its position in the path. Previously, forwarding hops would reject intermediate onion layers containing message content TLV records, but dummy hops would accept them. A malicious sender could insert these records at different non-final layers and observe whether the final message produces a response, potentially discovering where actual forwarding ends and dummy hops begin. Now, LDK also rejects message content records at dummy hops.
-
● LND #11068 fixes a missing auxiliary HTLC signature check in experimental taproot overlay channels used by Taproot Assets (see newsletter #324). In these channels, the Taproot Assets signer (
tapd) provides an additional signature entry for each non-dust HTLC, in addition to the regular Bitcoin signature. Previously, if a peer’s commitment included the required Bitcoin signatures but omitted some or all auxiliary HTLC signature entries, the receiving LND node would still incorrectly accept it. If the channel was later force-closed, the missing signatures could prevent the affected asset HTLCs from being resolved on-chain. Now, LND verifies that the number of received auxiliary signature entries matches the number of non-dust HTLCs. If not, LND rejects the commitment and force-closes the channel. -
● Rust Bitcoin #6956 introduces a
ScriptCodetype for the script data used in legacy and segwit v0 signature hashes, which may differ from the full script being spent. According to BIP143, if a P2WSH script contains OP_CODESEPARATOR, the signature hash excludes the last executed separator before the signature check and everything before it, while retaining all separators after it. Previously,p2wsh_signature_hashaccepted a witness script, which could lead callers to hash the full script and produce an invalid signature. Now, this API accepts aScriptCode, but callers must still determine the last executed separator and truncate the script themselves. This PR also addsP2wpkhScriptCode, which represents the standard script used to sign P2WPKH inputs in a fixed-size, allocation-free form. -
● BDK #2319 fixes a bug where a wallet using an Electrum backend could lose track of a transaction’s confirmation status if the transaction was re-mined at the same height after a reorg. BDK might retain the block header of the replaced block in its cache, fail to recognize the transaction’s confirmation in the replacement block, and incorrectly display it as unconfirmed. With the fix, the cache is refreshed with newly fetched block headers during sync, including after a single-block reorg.
Republication notice
Source: Bitcoin Optech. This article is republished under the MIT license; the original text and links are retained, the page layout has been adapted, and the original images have not been republished. Any topic guide added to the title is editorial, provided by 新云社. Original text and links retained; formatting adapted and images omitted. Any topic guide added to the title is editorial.
Source license information · MIT License
The MIT License (MIT) Copyright (c) 2018 Bitcoin Optech contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.





