Skip to content

Denial of service in geth

Moderate severity GitHub Reviewed Published Nov 24, 2020 in ethereum/go-ethereum • Updated Feb 14, 2023

Package

gomod github.com/ethereum/go-ethereum (Go)

Affected versions

>= 1.9.16, < 1.9.18

Patched versions

1.9.18
gomod github.com/holiman/uint256 (Go)
>= 0.1.0, < 1.1.1
1.1.1

Description

Impact

Denial-of-service (crash) during block processing

Details

Affected versions suffer from a vulnerability which can be exploited through the MULMOD operation, by specifying a modulo of 0: mulmod(a,b,0), causing a panic in the underlying library.
The crash was in the uint256 library, where a buffer underflowed.

if `d == 0`, `dLen` remains `0`

and https://github.com/holiman/uint256/blob/4ce82e695c10ddad57215bdbeafb68b8c5df2c30/uint256.go#L451 will try to access index [-1].

The uint256 library was first merged in this commit, on 2020-06-08.
Exploiting this vulnerabilty would cause all vulnerable nodes to drop off the network.

The issue was brought to our attention through a bug report, showing a panic occurring on sync from genesis on the Ropsten network.

It was estimated that the least obvious way to fix this would be to merge the fix into uint256, make a new release of that library and then update the geth-dependency.

Patches

Upgrade to v1.9.18 or higher

For more information

If you have any questions or comments about this advisory:

References

@holiman holiman published to ethereum/go-ethereum Nov 24, 2020
Reviewed May 21, 2021
Published to the GitHub Advisory Database Jun 29, 2021
Last updated Feb 14, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

EPSS score

0.105%
(44th percentile)

CVE ID

CVE-2020-26242

GHSA ID

GHSA-jm5c-rv3w-w83m

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.