Bitcoin Lightning developers patch bug that could make completed payments disappear
In this news:
Key takeaways
- LND v0.21.8-beta and v0.20.8-beta, released Nov. 11, patch a bug that could drop settled payments after restart.
- A 16-bit counter wrapped to zero at 65,536 entries, so restarted nodes could read an empty update list.
- Developers identified no confirmed exploitation or financial losses tied to the flaw.
Bitcoin Lightning developers patched a software vulnerability that could cause nodes to lose track of settled payments after a restart, potentially disrupting the accounting records that secure payment channels.
The flaw affected LND, a widely used implementation of Bitcoin's Lightning Network, which enables users to send Bitcoin through payment channels without recording every transaction directly on the blockchain.
Developers released v0.21.8-beta and v0.20.8-beta on Nov. 11 to address the issue, which stemmed from an error in how the software saved and restored channel updates.
Counter overflow dropped settled payments after restart
The vulnerability could cause a node to reconstruct incomplete payment records after restarting, even when the original information remained stored on its disk.
That failure threatened the consistency of Lightning channels, where participants rely on accurate records to determine which payments have settled and what each party is owed.
According to LND maintainer Olaoluwa Osuntokun, known as Roasbeef, the problem involved a counter that tracked acknowledged updates from a connected Lightning peer.
The software stored the number of entries using a 16-bit unsigned integer, which can represent values only up to 65,535.
Once the list reached 65,536 entries, the counter reset to zero, even though LND continued writing the updates to storage.
Upon restarting, the node could interpret that zero as an empty list and omit a previously settled hashed timelock contract (HTLC), a conditional payment mechanism that helps secure transactions across Lightning channels.
Developers identify how Lightning peers could trigger the flaw
The vulnerability became more concerning after developers identified a potential way for connected peers to push the affected update list toward its limit.
In the GitHub discussion, LND collaborator ziggie1984 explained that a peer could repeatedly send transaction fee updates and commitment signatures while withholding a required revocation message.
That behavior allowed the list of pending acknowledgments to grow without being cleared.
The developer reproduced the behavior in a unit test, generating 201 stored updates after 200 rounds of messages.
Crucially, the accumulated entries survived reconnects, suggesting that repeatedly disconnecting and reconnecting would not necessarily prevent the list from eventually reaching the overflow threshold.
The potential weakness matters because Lightning depends on both parties maintaining consistent payment-channel states. Losing track of a settled update could undermine the records used to reconcile channel obligations.
However, the project's disclosures do not identify any confirmed exploitation or financial losses associated with the flaw.
Fix adds write checks and recovers older records
To address the problem, developers introduced checks that prevent oversized update lists from advancing the channel state or being written to storage.
They also modified how LND reads existing records, allowing nodes to recover complete update lists saved by older versions when the underlying data passes validation.
The fix was merged into LND's main development branch on Nov. 5 before being included in both November releases.
Source: cryptoslate.com
Share the article:
Trending News & Crypto World
Latest Crypto News
Top Trending Cryptocurrencies on The Market
Current Price
$23.380
Market Cap
$1.2B 0.57%
24h Volume
$31.1M
Supplies
81.3M / ∞
Current Price
$0.1438
Market Cap
$1.2B 5.37%
24h Volume
$26.4M
Supplies
8.0B / 9.9B
Current Price
$0.000001280
Market Cap
$1.1B 2.12%
24h Volume
$25.6M
Supplies
888.8T / 1000.0T
Current Price
$0.2304
Market Cap
$1.1B 6.70%
24h Volume
$83.7M
Supplies
10.0B / 10.0B
Current Price
$0.04473
Market Cap
$1.0B 6.34%
24h Volume
$11.3M
Supplies
23.4B / 23.5B
Current Price
$0.3929
Market Cap
$1.0B 3.30%
24h Volume
$57.5M
Supplies
7.8B / 8.0B
Current Price
$1.0000
Market Cap
$955.9M -0.02%
24h Volume
$19.7M
Supplies
955.9M / ∞
Current Price
$104.62
Market Cap
$953.3M 0.00%
24h Volume
-
Supplies
9.1M / ∞
Current Price
$0.2812
Market Cap
$931.4M 10.57%
24h Volume
$124.8M
Supplies
6.2B / 6.2B
Current Price
$1.320
Market Cap
$924.6M 4.05%
24h Volume
$6.7M
Supplies
907.9M / 2.0B
Current Price
$3.360
Market Cap
$923.8M 18.26%
24h Volume
$31.5M
Supplies
1.0B / 1.0B
Current Price
$1.640
Market Cap
$914.4M 9.61%
24h Volume
$37.8M
Supplies
559.2M / ∞