Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Illegal Stack Data #74

Open
Latrasis opened this issue Oct 16, 2018 · 0 comments
Open

Handle Illegal Stack Data #74

Latrasis opened this issue Oct 16, 2018 · 0 comments
Labels
A-code Area: Code A-spec Area: Specification P-low Low priority T-evm Target system: Ethereum EVM

Comments

@Latrasis
Copy link
Member

We need to handle the scenario where there's unsafe stack data that we can't be sure is unreachable.

Static Jumps are only jumps with a PUSH1 behind.
Every other jump is Dynamic. (Syscall, MLOAD, CODEEXT, CODECOPY)...

This means during OCCV, if there's an illegal opcode:

  • If there's no jumptable:
    • ...and there is at least one dynamic jump, reject the contract
    • ...and all the jumps are static, check if the opcode is reachable with a jumpdest, if yes, reject.
  • If there's a valid jumptable:
    *...and there at least one dynamic jump outside it, reject the contract
@Latrasis Latrasis added A-spec Area: Specification A-code Area: Code P-low Low priority labels Oct 16, 2018
@Latrasis Latrasis added the T-evm Target system: Ethereum EVM label May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-code Area: Code A-spec Area: Specification P-low Low priority T-evm Target system: Ethereum EVM
Projects
None yet
Development

No branches or pull requests

1 participant