Skip to content

Nervos CKB Snappy decompress length can be very large and causes out of memory error

High severity GitHub Reviewed Published Aug 12, 2020 in nervosnetwork/ckb • Updated Feb 3, 2024

Package

cargo ckb (Rust)

Affected versions

<= 0.34.1

Patched versions

0.34.2

Description

Impact

Adversary can create message which compressed size is less than the package limit but the decompressed length is very large such as 1G. It will cost the node many memories to process the network messages, and on the system with less than 1G memory, the process is killed directly because of out of memory error.

Patches

The node must check the decompress length before allocating the memory for the message.

References

References

@doitian doitian published to nervosnetwork/ckb Aug 12, 2020
Published to the GitHub Advisory Database Feb 3, 2024
Reviewed Feb 3, 2024
Last updated Feb 3, 2024

Severity

High

Weaknesses

No CWEs

CVE ID

No known CVE

GHSA ID

GHSA-3gjh-29fv-8hr6

Source code

No known source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.