High, CVSS 7.5crates.ioPublished
libp2p DoS vulnerability from lack of resource management
CVE-2022-23486 · GHSA-jvgw-gccv-q5p8
- Affected
- crates.io libp2p <= 0.45.0
- Fixed in
- 0.45.1· Vendor fix available
- Issue
- Impact An attacker node can cause a victim node to allocate a large number of small memory chunks, which can ultimately lead to the victim’s process running out of memory and thus getting killed by its operating system. When executed continuously, this can lead to a denial of service attack, especially relevant on a larger scale when run against more than one node of a libp2p based network. Details In the original version of the attack, the malicious node would continuously open new streams on a single connection using a stream multiplexer that doesn’t provide sufficient back pressure (mplex or yamux). While allocations per stream might be considered small, they multiply with the number of streams and connections. It is easy to defend against this one attack, e.g. by setting a strict per connection stream limit and connection limit. But there are other variations of this attack, e.g. causing memory allocations by sending partial payloads on various protocol levels, forcing the victim…
Recommended action: Upgrade to 0.45.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.