Skip to content

Memory over-allocation in evm crate

Moderate severity GitHub Reviewed Published May 11, 2021 in rust-ethereum/evm • Updated Jan 30, 2024

Package

cargo evm (Rust)

Affected versions

<= 0.21.0
= 0.22.0
= 0.23.0
= 0.24.0
= 0.25.0
= 0.26.0

Patched versions

0.21.1
0.22.1
0.23.1
0.24.1
0.25.1
0.26.1
cargo evm-core (Rust)
<= 0.21.0
= 0.22.0
= 0.23.0
= 0.24.0
= 0.25.0
= 0.26.0
0.21.1
0.22.1
0.23.1
0.24.1
0.25.1
0.26.1

Description

Impact

Prior to the patch, when executing specific EVM opcodes related to memory operations that use evm_core::Memory::copy_large, the crate can over-allocate memory when it is not needed, making it possible for an attacker to perform denial-of-service attack.

Patches

The flaw was corrected in commit 19ade85. Users should upgrade to ==0.21.1, ==0.23.1, ==0.24.1, ==0.25.1, >=0.26.1.

Workarounds

None. Please upgrade your evm crate version

References

Fix commit: rust-ethereum/evm@19ade85

For more information

If you have any questions or comments about this advisory:

References

@sorpaas sorpaas published to rust-ethereum/evm May 11, 2021
Published by the National Vulnerability Database May 12, 2021
Published to the GitHub Advisory Database Jan 30, 2024
Reviewed Jan 30, 2024
Last updated Jan 30, 2024

Severity

Moderate
6.5
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

CVE ID

CVE-2021-29511

GHSA ID

GHSA-4jwq-572w-4388

Source code

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