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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

VM has a lot of consensus breaking bugs 馃悶 #167

Closed
axic opened this Issue Aug 11, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@axic
Member

axic commented Aug 11, 2017

While doing #159 I've realised that all the opcodes using memory locations are very likely consensus-broken because they are straight converted using utils.bufferToInt to Javascript numbers.

If the input number is >= 53 bits it will not behave correctly - old ethereumjs-util truncated it silently, while the new one properly throws an exception.

In many of the cases, if such a large number is encountered, it should result on an OOG, but in our case it can fail very likely with INVALID_OPCODE.

Makes me wonder if the state tests have a good coverage (because we do pass them...) or they are left to the VM tests to check these bounds?

@axic

This comment has been minimized.

Show comment
Hide comment
@axic

axic Aug 11, 2017

Member

Simple test case 0 <54 bit number> MSTORE.

Member

axic commented Aug 11, 2017

Simple test case 0 <54 bit number> MSTORE.

@axic

This comment has been minimized.

Show comment
Hide comment
@axic

axic Aug 11, 2017

Member

Affected opcodes:

  • ISZERO
  • BYTE
  • SHA3
  • CALLDATALOAD
  • CALLDATACOPY
  • CODECOPY
  • EXTCODECOPY
  • BLOCKHASH
  • MLOAD
  • MSTORE
  • MSTORE8
  • JUMP
  • JUMPI
  • LOG
  • CREATE
  • CALL
  • CALLCODE
  • DELEGATECALL
  • RETURN
Member

axic commented Aug 11, 2017

Affected opcodes:

  • ISZERO
  • BYTE
  • SHA3
  • CALLDATALOAD
  • CALLDATACOPY
  • CODECOPY
  • EXTCODECOPY
  • BLOCKHASH
  • MLOAD
  • MSTORE
  • MSTORE8
  • JUMP
  • JUMPI
  • LOG
  • CREATE
  • CALL
  • CALLCODE
  • DELEGATECALL
  • RETURN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment