GHSA-48VQ-8JQV-GM6F
Vulnerability from github – Published: 2021-08-25 21:01 – Updated: 2021-08-02 21:53In the ckb sync protocol, SyncState maintains a HashMap called 'misbehavior' that keeps a score of a peer's violations of the protocol. This HashMap is keyed to PeerIndex (an alias for SessionId), and entries are never removed from it. SessionId is an integer that increases monotonically with every new connection.
A remote attacker can manipulate this HashMap to grow forever, resulting in degraded performance and ultimately a panic on allocation failure or being killed by the OS, depending on the platform.
This is a critical severity security bug. It could be exploited to create a targeted or network-wide denial of service, to reduce the hash power of the network as part of a 51% attack, and perhaps in other creative ways.
An attack is trivial:
- connect to another node
- send an invalid sync protocol request, such as
SendHeadersfor non-consecutive blocks - disconnect
- repeat
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "ckb"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.40.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": true,
"github_reviewed_at": "2021-08-02T21:53:41Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "In the ckb sync protocol, SyncState maintains a HashMap called \u0027misbehavior\u0027 that keeps a score of a peer\u0027s violations of the protocol. This HashMap is keyed to PeerIndex (an alias for SessionId), and entries are never removed from it. SessionId is an integer that increases monotonically with every new connection.\n\nA remote attacker can manipulate this HashMap to grow forever, resulting in degraded performance and ultimately a panic on allocation failure or being killed by the OS, depending on the platform.\n\nThis is a critical severity security bug. It could be exploited to create a targeted or network-wide denial of service, to reduce the hash power of the network as part of a 51% attack, and perhaps in other creative ways.\n\nAn attack is trivial:\n\n1. connect to another node\n2. send an invalid sync protocol request, such as `SendHeaders` for non-consecutive blocks\n3. disconnect\n4. repeat",
"id": "GHSA-48vq-8jqv-gm6f",
"modified": "2021-08-02T21:53:41Z",
"published": "2021-08-25T21:01:23Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/nervosnetwork/ckb/security/advisories/GHSA-48vq-8jqv-gm6f"
},
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2021-0108.html"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Remote memory exhaustion in ckb"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.