Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

EVM array overflow with memory set operations #88

Open
ferranbt opened this issue May 2, 2019 · 0 comments
Open

EVM array overflow with memory set operations #88

ferranbt opened this issue May 2, 2019 · 0 comments
Labels

Comments

@ferranbt
Copy link
Contributor

ferranbt commented May 2, 2019

There is a case for an overflow in the EVM with Opcodes that resize the memory like here. The memory set operation does not check if the resize length of the memory overflows the max size of an array in Go. This would fail in the gas cost, however, the gas cost is computed later so the error is not catched.

It will require a change in the flow of all the memory operations:

  • Resize the memory to the correct size (or at least compute the cost)
  • Calculate gas cost
  • Set the value and resize if necessary

This issue is not covered in the ethereum/tests repo.
There are 3 txns around block 300K that produce this error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant