Skip to content

GHSA-j35p-q24r-5367

Dep Group Remote Memory Exhaustion (Denial of Service) in ckb

High crates.io
Severity
High
The publisher's own rating, not a CVSS score
Exploit chance (EPSS)
—
No score published
Known exploited
No
Not in CISA's catalog
Weakness
—
Not classified
Fix
0.43.1
Upgrade ckb to this version or later

Description

Impact

A remote attacker could exploit this vulnerability to exhaust ckb process memory of an affected node.

Patches

Upgrade to 0.43.1 or later.

References

After resolving the outpoints of one dep group, we put the corresponding content into a vec ( https://github.com/nervosnetwork/ckb/blob/v0.42.0/util/types/src/core/cell.rs#L600-L617 ), there is a vulnerability to a memory dos attack because there is no determination of whether the outpoints is duplicated.

PoC:

before send dos tx rss:
105700

after rss:
2306932

DoS cost: 25.6 KB * 150 + dep_tx out_points capacity ( 36 * 150 * 100 = 540000 ) = 4380000 CKB Send 50 dos_tx, memory exhausted: (25.6 KB * 150 * 100) * 50 = 19.2 GB

Affected versions

crates.io

PackageVulnerableFixed in
ckb
< 0.43.1
0.43.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

ckb crates.io → 0.43.1

cargo
cargo update -p ckb --precise 0.43.1

References

Timeline

  1. Published
AdvisorySeverityWhy it's related
GHSA-29c2-65rj-h343
Nervos CKB Permit load cell data from memory
Medium Also affects ckb
GHSA-h4c3-5275-vrmg
Nervos CKB Pool does not remove the conflicting transactions from the statistics
Medium Also affects ckb
GHSA-q73f-w3h7-7wcc
Nervos CKB Transaction which calls syscall load_cell_data_hash has nondeterministic result
Critical Also affects ckb
GHSA-3gjh-29fv-8hr6
Nervos CKB Snappy decompress length can be very large and causes out of memory error
High Also affects ckb
GHSA-wjxc-pjx9-4wvm
Nervos CKB Panic on malformed input
High Also affects ckb
GHSA-hjqq-29pw-96wj
Nervos CKB node panics when processing a block which parent timestamp is too new
High Also affects ckb
GHSA-r9rv-9mh8-pxf4
Nervos CKB BlockTimeTooNew should not be considered as invalid block
Medium Also affects ckb
GHSA-pr39-8257-fxc2
Nervos CKB DoS: Process exists when p2p discovery protocol receives unsupported peer IP
Low Also affects ckb
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor