GHSA-CVJ7-5F3C-9VG9

Vulnerability from github – Published: 2022-05-24 22:21 – Updated: 2022-05-24 22:21
VLAI?
Summary
AttesterSlashing number overflow
Details

Impact

Possible consensus split given maliciously-crafted AttesterSlashing or ProposerSlashing being included on-chain.

Since we represent uint64 values as native javascript numbers, there is an issue when those variables with large (greater than 2^53) uint64 values are included on chain. In those cases, Lodestar may view valid AttesterSlashing or ProposerSlashing as invalid, due to rounding errors in large number values. This causes a consensus split, where Lodestar nodes are forked away from the main network.

Similarly Lodestar may consider invalid ProposerSlashing as valid, thus including in proposed blocks that will be considered invalid by the network.

Patches

https://github.com/ChainSafe/lodestar/pull/3977

Workarounds

Use BigInt to represent Slot and Epoch values in AttesterSlashing and ProposerSlashing objects. BigInt is too slow to be used in all Slot and Epoch cases, so we will carefully use BigInt just where necessary for consensus.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "@chainsafe/lodestar"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.36.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2022-29219"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-190"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2022-05-24T22:21:10Z",
    "nvd_published_at": "2022-05-24T15:15:00Z",
    "severity": "HIGH"
  },
  "details": "### Impact\n\nPossible consensus split given maliciously-crafted `AttesterSlashing` or `ProposerSlashing` being included on-chain.\n\nSince we represent `uint64` values as native javascript `number`s, there is an issue when those variables with large (greater than 2^53) `uint64` values are included on chain. In those cases, Lodestar may view _valid_ `AttesterSlashing` or `ProposerSlashing` as _invalid_, due to rounding errors in large `number` values. This causes a consensus split, where Lodestar nodes are forked away from the main network.\n\nSimilarly Lodestar may consider _invalid_ `ProposerSlashing` as _valid_, thus including in proposed blocks that will be considered invalid by the network.\n\n### Patches\n\nhttps://github.com/ChainSafe/lodestar/pull/3977\n\n### Workarounds\n\nUse `BigInt` to represent `Slot` and `Epoch` values in `AttesterSlashing` and `ProposerSlashing` objects. `BigInt` is too slow to be used in all `Slot` and `Epoch` cases, so we will carefully use `BigInt` just where necessary for consensus.",
  "id": "GHSA-cvj7-5f3c-9vg9",
  "modified": "2022-05-24T22:21:10Z",
  "published": "2022-05-24T22:21:10Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/ChainSafe/lodestar/security/advisories/GHSA-cvj7-5f3c-9vg9"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-29219"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ChainSafe/lodestar/pull/3977"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/ChainSafe/lodestar"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ChainSafe/lodestar/releases/tag/v0.36.0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "AttesterSlashing number overflow"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

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.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…