Skip to content

Handle Illegal Stack Data #74

Open
@Latrasis

Description

@Latrasis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codeArea: CodeA-specArea: SpecificationP-lowLow priorityT-evmTarget system: Ethereum EVM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions