CVE-2021-41272

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-41272
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-41272.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2021-41272
Related
  • GHSA-7pg2-p5vj-xp5h
Published
2021-12-13T21:15:09.083Z
Modified
2025-11-14T12:27:01.036887Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

Besu is an Ethereum client written in Java. Starting in version 21.10.0, changes in the implementation of the SHL, SHR, and SAR operations resulted in the introduction of a signed type coercion error in values that represent negative values for 32 bit signed integers. Smart contracts that ask for shifts between approximately 2 billion and 4 billion bits (nonsensical but valid values for the operation) will fail to execute and hence fail to validate. In networks where vulnerable versions are mining with other clients or non-vulnerable versions this will result in a fork and the relevant transactions will not be included in the fork. In networks where vulnerable versions are not mining (such as Rinkeby) no fork will result and the validator nodes will stop accepting blocks. In networks where only vulnerable versions are mining the relevant transaction will not be included in any blocks. When the network adds a non-vulnerable version the network will act as in the first case. Besu 21.10.2 contains a patch for this issue. Besu 21.7.4 is not vulnerable and clients can roll back to that version. There is a workaround available: Once a transaction with the relevant shift operations is included in the canonical chain, the only remediation is to make sure all nodes are on non-vulnerable versions.

References

Affected packages

Git / github.com/hyperledger/besu

Affected ranges

Type
GIT
Repo
https://github.com/hyperledger/besu
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

0.*

0.8.0
0.8.1
0.8.2
0.8.3
0.8.4
0.8.5
0.9.0
0.9.1

1.*

1.0.0-RC1
1.0.2
1.0.3
1.1.0-RC1
1.1.1
1.1.2
1.1.3
1.1.4
1.2.0-RC1
1.2.1
1.2.2
1.2.3
1.2.4
1.3.0-RC1
1.3.1
1.3.2
1.3.3
1.3.4
1.3.6
1.3.7
1.3.8
1.4.0-RC1
1.4.0-beta1
1.4.0-beta2
1.4.0-beta3
1.4.1
1.4.2
1.4.3
1.4.4
1.4.5-RC1
1.4.5-RC2
1.4.5-RC3
1.4.6-RC1
1.5.0-RC1
1.5.1-RC1
1.5.2
1.5.3
1.5.4
1.5.5

Other

1626082128492
1626086821182

20.*

20.10.0-RC1
20.10.1
20.10.2
20.10.3
20.10.4

21.*

21.1.0-RC1
21.1.1
21.1.2
21.1.3
21.1.4
21.1.5
21.1.6
21.1.7
21.10.0-RC1
21.10.1
21.2.0-RC1
21.7.1
21.7.3
21.7.4

22.*

22.10.101

23.*

23.1.100

Database specific

vanir_signatures

[
    {
        "signature_version": "v1",
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "function_hash": "206075614826259374005026430035916975791",
            "length": 483.0
        },
        "target": {
            "file": "evm/src/main/java/org/hyperledger/besu/evm/operation/ShrOperation.java",
            "function": "executeFixedCostOperation"
        },
        "id": "CVE-2021-41272-0e5a5f0e",
        "source": "https://github.com/hyperledger/besu/commit/4170524ac3b45185704fcfbdeeb71b0b05dfa0a1"
    },
    {
        "signature_version": "v1",
        "signature_type": "Line",
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "2612974591185232527776505978065818007",
                "114188683243816944482271958866728263494",
                "173731090619030736691955510229895183044",
                "236605375288573664967715999316838890656"
            ]
        },
        "target": {
            "file": "evm/src/main/java/org/hyperledger/besu/evm/operation/ShlOperation.java"
        },
        "id": "CVE-2021-41272-13eaa743",
        "source": "https://github.com/hyperledger/besu/commit/4170524ac3b45185704fcfbdeeb71b0b05dfa0a1"
    },
    {
        "signature_version": "v1",
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "function_hash": "223902155690443517952535290149312076226",
            "length": 657.0
        },
        "target": {
            "file": "evm/src/main/java/org/hyperledger/besu/evm/operation/SarOperation.java",
            "function": "executeFixedCostOperation"
        },
        "id": "CVE-2021-41272-24aa80b6",
        "source": "https://github.com/hyperledger/besu/commit/4170524ac3b45185704fcfbdeeb71b0b05dfa0a1"
    },
    {
        "signature_version": "v1",
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "function_hash": "206075614826259374005026430035916975791",
            "length": 483.0
        },
        "target": {
            "file": "evm/src/main/java/org/hyperledger/besu/evm/operation/ShlOperation.java",
            "function": "executeFixedCostOperation"
        },
        "id": "CVE-2021-41272-c0843adf",
        "source": "https://github.com/hyperledger/besu/commit/4170524ac3b45185704fcfbdeeb71b0b05dfa0a1"
    },
    {
        "signature_version": "v1",
        "signature_type": "Line",
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "221789792846325855991572775923948039628",
                "21357303606747366806971841921009373564",
                "95790116778057890179302032722971225567",
                "245240058031175629897915570699403563966"
            ]
        },
        "target": {
            "file": "evm/src/main/java/org/hyperledger/besu/evm/operation/SarOperation.java"
        },
        "id": "CVE-2021-41272-c1f703cf",
        "source": "https://github.com/hyperledger/besu/commit/4170524ac3b45185704fcfbdeeb71b0b05dfa0a1"
    },
    {
        "signature_version": "v1",
        "signature_type": "Line",
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "2612974591185232527776505978065818007",
                "114188683243816944482271958866728263494",
                "173731090619030736691955510229895183044",
                "139912389753614802694283541713387142664"
            ]
        },
        "target": {
            "file": "evm/src/main/java/org/hyperledger/besu/evm/operation/ShrOperation.java"
        },
        "id": "CVE-2021-41272-f4fda5bd",
        "source": "https://github.com/hyperledger/besu/commit/4170524ac3b45185704fcfbdeeb71b0b05dfa0a1"
    }
]