Skip to content
Heist/ feed
Back to feed
UnratedFix available

Remote memory exhaustion in ckb

Type: advisorySources: OSV

In 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.

Products
ckb
Affected versions
Not specified
Fixed versions
0.40.0
CVEs
CVE-2021-45699
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 08:42 UTC · Revision 1

Source evidence

Remote memory exhaustion in ckb

core-osv · Original source

Published 25 Jul 2021, 12:00 UTC

In 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.

osv:RUSTSEC-2021-0108

ckb

Fixed versions: 0.40.0

Complete source record
{
  "id": "3cc166ade72485cce7962f13239c5133658d31fe2174fbfcb0f7e1ee60bbc439",
  "url": "https://osv.dev/vulnerability/RUSTSEC-2021-0108",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Remote memory exhaustion in ckb",
    "summary": "In 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.",
    "evidence": "osv:RUSTSEC-2021-0108",
    "products": [
      {
        "name": {
          "value": "ckb",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.40.0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "RUSTSEC-2021-0108",
      "aliases": [
        "CVE-2021-45699",
        "GHSA-2969-8hh9-57jc",
        "GHSA-48vq-8jqv-gm6f",
        "RUSTSEC-2021-0108"
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0.0.0-0"
                },
                {
                  "fixed": "0.40.0"
                }
              ]
            }
          ],
          "package": {
            "name": "ckb",
            "purl": "pkg:cargo/ckb",
            "ecosystem": "crates.io"
          },
          "database_specific": {
            "cvss": null,
            "source": "https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2021-0108.json",
            "categories": [],
            "informational": null
          },
          "ecosystem_specific": {
            "affects": {
              "os": [],
              "arch": [],
              "functions": []
            },
            "affected_functions": null
          }
        }
      ],
      "modified": "2026-10-12T18:00:05.111824805Z",
      "provider": "osv",
      "references": [
        "https://crates.io/crates/ckb",
        "https://rustsec.org/advisories/RUSTSEC-2021-0108.html"
      ],
      "provider_metadata": {
        "license": "CC0-1.0"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-45699",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 306345,
  "published_at": "2021-07-25T12:00:00+00:00"
}