Combined summary - DoS Disclosure: LND Onion Bomb

Combined summary - DoS Disclosure: LND Onion Bomb

The Rust-Lightning codebase adopts fixed-size allocation buffers throughout its structure, aligning with the recommendations of BOLT8 from the Lightning specification.

This specification caps the maximum message size at 65535 bytes, a measure designed to streamline node memory management based on predictable input sizes. The detailed specifications can be found in the Lightning message documentation available at GitHub. However, vulnerabilities have been identified related to how these size constraints are managed, particularly in versions of LND (Lightning Network Daemon) prior to 0.17.0.

The core of the vulnerability stemmed from an issue where LND nodes would preallocate memory buffers based on the encoded length of incoming messages, without proper verification of this length against the protocol's maximum allowed size. As a result, attackers could exploit this by setting the length of onion payload messages up to 4 GB, causing an immediate out-of-memory (OOM) crash by overwhelming the node with excessively large allocations for these payloads. This vulnerability made it feasible for attackers to execute DoS (Denial of Service) attacks by sending multiple malicious onion packets, thus crashing the nodes and potentially putting funds at risk.

To mitigate this risk and protect against potential DoS attacks exploiting this vulnerability, it is crucial for operators of LND nodes to upgrade to version 0.17.0 or later. The updated version introduces bounds checks on onion payload lengths to prevent such unchecked memory allocation. Upgrading ensures the node is safeguarded against this specific attack vector, enhancing overall network security. For more comprehensive insights into the vulnerability, its implications, and the steps taken to address it, consider reading the detailed analysis provided in the blog post titled "Understanding the LND Onion Bomb Vulnerability" available at This resource offers a deeper dive into the technical specifics and preventive strategies essential for maintaining node integrity and security within the Lightning Network ecosystem.

Discussion History

morehouseOriginal Post
June 18, 2024 17:48 UTC
June 18, 2024 23:27 UTC
June 18, 2024 23:27 UTC
June 18, 2024 23:38 UTC