{"id":"GHSA-j35p-q24r-5367","aliases":[],"url":"https://o3.security/vulnerability/GHSA-j35p-q24r-5367","summary":"Dep Group Remote Memory Exhaustion (Denial of Service) in ckb","details":"### Impact\nA remote attacker could exploit this vulnerability to exhaust ckb process memory of an affected node.\n\n### Patches\nUpgrade to 0.43.1 or later.\n\n### References\nAfter 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.\n\nPoC:\n```\nbefore send dos tx rss:\n105700\n\nafter rss:\n2306932\n```\n\nDoS cost: 25.6 KB * 150 + dep_tx out_points capacity ( 36 * 150 * 100 = 540000 ) = 4380000 CKB\nSend 50 dos_tx, memory exhausted: (25.6 KB * 150  * 100) * 50 = 19.2 GB\n\n","published":"2022-04-22T20:23:04Z","modified":"2022-04-22T20:23:04Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"crates.io","name":"ckb","fixedVersion":"0.43.1"}],"fix":null,"references":[{"type":"WEB","url":"https://github.com/nervosnetwork/ckb/security/advisories/GHSA-j35p-q24r-5367"},{"type":"PACKAGE","url":"https://github.com/nervosnetwork/ckb"},{"type":"WEB","url":"https://github.com/nervosnetwork/ckb/blob/v0.42.0/util/types/src/core/cell.rs#L600-L617"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2022-04-22T20:23:04Z"}}