LDK v0.2.6 fixes Lightning splice loss and restart bug

Lightning Development Kit released v0.2.6 on Sept. 9 to fix a splice fee-allocation bug that could divert small channel funds and a payment-hash flaw blocking ChannelManager loads.

Lightning Development Kit released version 0.2.6 on Sept. 9 to correct two vulnerabilities in its Lightning implementation that could affect channel funds and node restarts.

The first bug involves the splice operation used to add or remove funds from an existing Lightning channel. Splicing spends the channel’s funding output and replaces it with a new funding transaction whose fees are shared between participants. LDK’s update says a malicious counterparty could cause excess fee allocation so that a small portion of the initiating node’s funds is routed to the peer’s output. The release describes the amount at risk as small and does not give a numeric cap.

The second flaw concerns two payment contracts that share the same payment hash. If a node forwards one contract successfully and then receives and rejects a second bogus contract with the same hash, the saved ChannelManager state can fail to load during deserialization. ChannelManager is the component that tracks channels and payments; an application restart reads its saved ChannelManager state back into memory. If the saved state is rejected during loading, the node cannot complete a normal restart. LDK notes that merely rejecting the bogus payment does not prevent the load failure.

LDK is distributed as a software development kit whose core implementation is compiled into applications such as mobile wallets and payment services. Application teams supply the surrounding storage, wallet, networking and blockchain-monitoring components. Because the fixed code is inside the toolkit, developers must incorporate LDK v0.2.6 into their builds to receive the corrections.

The maintainers reported no observed losses or exploited applications tied to these vulnerabilities. The patched release is available and affected developers are expected to update their integrated applications to prevent the fee-allocation exploit and the ChannelManager deserialization failure. LDK’s documentation describes the splice mechanism and ChannelManager responsibilities for teams that run the toolkit in production.

Articles by this author