Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/vulndb: potential Go vuln in github.com/evmos/ethermint: CVE-2022-35936 #760

Closed
GoVulnBot opened this issue Aug 5, 2022 · 3 comments
Closed
Assignees
Labels
excluded: EFFECTIVELY_PRIVATE This vulnerability exists in a package can be imported, but isn't meant to be outside that module.

Comments

@GoVulnBot
Copy link

CVE-2022-35936 references github.com/evmos/ethermint, which may be a Go module.

Description:
Ethermint is an Ethereum library. In Ethermint running versions before v0.17.2, the contract selfdestruct invocation permanently removes the corresponding bytecode from the internal database storage. However, due to a bug in the DeleteAccountfunction, all contracts that used the identical bytecode (i.e shared the same CodeHash) will also stop working once one contract invokes selfdestruct, even though the other contracts did not invoke the selfdestruct OPCODE. This vulnerability has been patched in Ethermint version v0.18.0. The patch has state machine-breaking changes for applications using Ethermint, so a coordinated upgrade procedure is required. A workaround is available. If a contract is subject to DoS due to this issue, the user can redeploy the same contract, i.e. with identical bytecode, so that the original contract's code is recovered. The new contract deployment restores the bytecode hash -> bytecode entry in the internal state.

Links:

See doc/triage.md for instructions on how to triage this report.

packages:
  - module: github.com/evmos/ethermint
    package: ethermint
description: |
    Ethermint is an Ethereum library. In Ethermint running versions before `v0.17.2`, the contract `selfdestruct` invocation permanently removes the corresponding bytecode from the internal database storage. However, due to a bug in the `DeleteAccount`function, all contracts that used the identical bytecode (i.e shared the same `CodeHash`) will also stop working once one contract invokes `selfdestruct`, even though the other contracts did not invoke the `selfdestruct` OPCODE. This vulnerability has been patched in Ethermint version v0.18.0. The patch has state machine-breaking changes for applications using Ethermint, so a coordinated upgrade procedure is required. A workaround is available. If a contract is subject to DoS due to this issue, the user can redeploy the same contract, i.e. with identical bytecode, so that the original contract's code is recovered. The new contract deployment restores the `bytecode hash -> bytecode` entry in the internal state.
cves:
  - CVE-2022-35936
links:
    commit: https://github.com/evmos/ethermint/commit/144741832007a26dbe950512acbda4ed95b2a451
    context:
      - https://github.com/evmos/ethermint/blob/c9d42d667b753147977a725e98ed116c933c76cb/x/evm/keeper/statedb.go#L199-L203
      - https://github.com/evmos/ethermint/security/advisories/GHSA-f92v-grc2-w2fg

@rolandshoemaker
Copy link
Member

Vuln in importable package that is only used by the parent tool.

@neild neild added excluded: EFFECTIVELY_PRIVATE This vulnerability exists in a package can be imported, but isn't meant to be outside that module. and removed NotGoVuln labels Aug 10, 2022
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/592770 mentions this issue: data/reports: unexclude 50 reports

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/607223 mentions this issue: data/reports: unexclude 20 reports (21)

gopherbot pushed a commit that referenced this issue Aug 21, 2024
  - data/reports/GO-2022-0642.yaml
  - data/reports/GO-2022-0644.yaml
  - data/reports/GO-2022-0645.yaml
  - data/reports/GO-2022-0647.yaml
  - data/reports/GO-2022-0649.yaml
  - data/reports/GO-2022-0700.yaml
  - data/reports/GO-2022-0703.yaml
  - data/reports/GO-2022-0704.yaml
  - data/reports/GO-2022-0705.yaml
  - data/reports/GO-2022-0707.yaml
  - data/reports/GO-2022-0708.yaml
  - data/reports/GO-2022-0709.yaml
  - data/reports/GO-2022-0732.yaml
  - data/reports/GO-2022-0749.yaml
  - data/reports/GO-2022-0751.yaml
  - data/reports/GO-2022-0752.yaml
  - data/reports/GO-2022-0759.yaml
  - data/reports/GO-2022-0760.yaml
  - data/reports/GO-2022-0769.yaml
  - data/reports/GO-2022-0770.yaml

Updates #642
Updates #644
Updates #645
Updates #647
Updates #649
Updates #700
Updates #703
Updates #704
Updates #705
Updates #707
Updates #708
Updates #709
Updates #732
Updates #749
Updates #751
Updates #752
Updates #759
Updates #760
Updates #769
Updates #770

Change-Id: I3dabcc907fd498009a9bd4cf865198037615717e
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/607223
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tatiana Bradley <tatianabradley@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
excluded: EFFECTIVELY_PRIVATE This vulnerability exists in a package can be imported, but isn't meant to be outside that module.
Projects
None yet
Development

No branches or pull requests

4 participants