Lightning apps using unpatched LDK risk Bitcoin theft from a reconnect lie
Lightning Development Kit (LDK), a library for constructing Bitcoin Lightning wallets and fee purposes, has patched a flaw that would let a malicious channel peer steal the worth of a forwarded fee by mendacity after reconnecting. Affected utility builders want to include the repair into the software program they deploy.
The October 1-dated v0.2.7 and v0.1.13 safety releases handle the LDK reconnect vulnerability on the 0.2 and 0.1 branches, respectively. Bitcoin Optech described the fixes in its Oct. 9 newsletter.
How the LDK reconnect flaw may value Bitcoin
The assault begins with a channel peer acknowledging an replace, then reconnecting and pretending it by no means acquired it. Before the repair, that false declare may trigger LDK to signal a conflicting dedication transaction.
A dedication transaction represents a channel’s agreed state and can be utilized to settle it on Bitcoin’s blockchain. In the state of affairs described in PR 5057, the newly signed transaction was not recorded by LDK’s channel monitor, the element monitoring the channel’s on-chain claims.
That hole may flip a forwarded fee into a loss. The malicious sender may verify the transaction on-chain and let the fee settle with the subsequent recipient. It may then reclaim the incoming fee contract when it expired, despite the fact that the forwarding node knew the key usually used to say fee.
The forwarding utility would have paid downstream with out recovering the corresponding incoming funds. The repair permits retransmission solely whereas the peer’s acknowledgment stays excellent and force-closes the channel when the peer claims an already-acknowledged replace was missed.
Alongside the LDK reconnect repair, model 0.2.7 addresses a completely different theft path involving LSPS2 just-in-time funds, the place a liquidity service opens a channel as a part of dealing with a fee.
An intercepted fee may misrepresent its quantity, inflicting the service to open a channel and ahead extra Bitcoin than the incoming fee equipped. The service would cowl the distinction from its personal funds. PR 5042 addresses that quantity verify.
That publicity issues the LSPS2 service movement. The v0.1.13 notes listing the shared reconnect repair with out itemizing the LSPS2 repair.
These defects differ from the splice-fee diversion and saved-state loading bugs coated in CryptoSlate’s Sept. 13 LDK v0.2.6 report. Core Lightning is a separate implementation, as described within the replace beneath.
LDK’s architecture documentation explains that the SDK is compiled and executed inside purposes. Developers should incorporate the related patched library code into deployed software program. For LSPS2 integrations, the PR 5042 commit rationalization flags that fee contracts queued by a prior model retain unvalidated quantities; groups have to account for these pending contracts in addition to updating the library.
The submit Lightning apps using unpatched LDK risk Bitcoin theft from a reconnect lie appeared first on CryptoSlate.

