GHSA-3gjh-29fv-8hr6: Nervos CKB Snappy decompress length can be very large and causes out of memory error
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.
Published Feb 3, 2024
Affected packages
ckb
- Ecosystem
- Rust (crates.io)
- Affected
- <= 0.34.1
- Fixed in
- 0.34.2
- Check
cargo tree -i ckb
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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
- https://github.com/nervosnetwork/ckb/blob/687d797f1888dd05d1f38ce6d1bef3e5b9b6e38b/network/src/compress.rs#L68
- https://github.com/BurntSushi/rust-snappy/blob/master/src/decompress.rs#L106
- https://github.com/BurntSushi/rust-snappy/blob/6cfb836463b9b3ac48ca7cd15d0a50d030e95769/src/decompress.rs#L30
Credited to quake.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Rust (crates.io) vulnerabilities
All Rust (crates.io) entriesGHSA-29c2-65rj-h343
Nervos CKB Permit load cell data from memory
mediumFeb 3, 2024GHSA-h4c3-5275-vrmg
Nervos CKB Pool does not remove the conflicting transactions from the statistics
mediumFeb 3, 2024GHSA-q73f-w3h7-7wcc
Nervos CKB Transaction which calls syscall load_cell_data_hash has nondeterministic result
criticalFeb 3, 2024GHSA-wjxc-pjx9-4wvm
Nervos CKB Panic on malformed input
highFeb 3, 2024GHSA-84x2-2qv6-qg56
Nervos CKB P2P DoS Attacks
criticalFeb 2, 2024GHSA-hjqq-29pw-96wj
Nervos CKB node panics when processing a block which parent timestamp is too new
highFeb 2, 2024
