ghsa-hhc4-47rh-cr34
Vulnerability from github
Published
2022-10-25 22:27
Modified
2022-10-25 22:27
Summary
Incorrect is_static parameter for custom stateful precompiles in SputnikVM (evm)
Details

Impact

A custom stateful precompile can use the is_static parameter to determine if the call is executed in a static context (via STATICCALL), and thus decide if stateful operations should be done. Previously, the passed is_static parameter was incorrect -- it was only set to true if the call comes from a direct STATICCALL opcode. However, once a static call context is entered, it should stay static.

The issue only impacts custom precompiles that actually uses is_static. The maintainers estimate the usage is low. However, for those affected, it can lead to possible incorrect state transitions.

Patches

PR: https://github.com/rust-blockchain/evm/pull/133 Released in v0.36.0.

Older patch versions can be released on request if anyone needs them. Simply contact @sorpaas by email to request it.

For more information

If you have any questions or comments about this advisory: * Open an issue in evm repo * Email Wei at wei@that.world

Show details on source website


{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.35.0"
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "evm"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.36.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2022-39354"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-670"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2022-10-25T22:27:21Z",
    "nvd_published_at": "2022-10-25T19:15:00Z",
    "severity": "MODERATE"
  },
  "details": "### Impact\n\nA custom stateful precompile can use the `is_static` parameter to determine if the call is executed in a static context (via `STATICCALL`), and thus decide if stateful operations should be done. Previously, the passed `is_static` parameter was incorrect -- it was only set to `true` if the call comes from a **direct** `STATICCALL` opcode. However, once a static call context is entered, it should stay static. \n\nThe issue only impacts custom precompiles that actually uses `is_static`. The maintainers estimate the usage is low. However, for those affected, it can lead to possible incorrect state transitions.\n\n### Patches\n\nPR: https://github.com/rust-blockchain/evm/pull/133\nReleased in v0.36.0.\n\nOlder patch versions can be released on request if anyone needs them. Simply contact @sorpaas by email to request it.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [evm repo](https://github.com/rust-blockchain/evm)\n* Email Wei at [wei@that.world](mailto:wei@that.world)\n",
  "id": "GHSA-hhc4-47rh-cr34",
  "modified": "2022-10-25T22:27:21Z",
  "published": "2022-10-25T22:27:21Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/rust-blockchain/evm/security/advisories/GHSA-hhc4-47rh-cr34"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-39354"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rust-blockchain/evm/pull/133"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/rust-blockchain/evm"
    },
    {
      "type": "WEB",
      "url": "https://rustsec.org/advisories/RUSTSEC-2022-0083.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Incorrect is_static parameter for custom stateful precompiles in SputnikVM (evm)"
}


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 seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…