GHSA-3gjh-29fv-8hr6
high
Nervos CKB Snappy decompress length can be very large and causes out of memory error
- Severity
- high rating by GitHub
- Published
- Last changed
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
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| ckb (crates.io) | before 0.34.2 | GitHub Advisory Database |
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-3gjh-29fv-8hr6 changed 2024-02-03 | CC-BY-4.0 |