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

Symbolic execution PoC #1030

Closed
wants to merge 2 commits into from
Closed

Symbolic execution PoC #1030

wants to merge 2 commits into from

Conversation

arcz
Copy link
Member

@arcz arcz commented Apr 18, 2023

A quick PoC that breaks this contract (included in tests):

contract VulnerableContract {
   function func_one(int256 x) public pure {
     if (x / 4 == -20) {
       assert(false); // BUG
     }
   }

   function func_two(int128 x) public payable {
     if ((msg.value >> 30) / 7 == 2) {
       assert(false); // BUG
     }
   }
}

Screenshot 2023-04-19 at 00 21 49

Non-nix tests fail because I need to figure out how to install solvers :p

@arcz arcz requested a review from ggrieco-tob as a code owner April 18, 2023 01:15
@arcz arcz marked this pull request as draft April 18, 2023 01:15
@arcz arcz force-pushed the symexec branch 2 times, most recently from 9abcd5c to 857a527 Compare April 18, 2023 07:54
flake.nix Show resolved Hide resolved
lib/Echidna/SymExec.hs Outdated Show resolved Hide resolved
lib/Echidna/SymExec.hs Outdated Show resolved Hide resolved
lib/Echidna/SymExec.hs Outdated Show resolved Hide resolved
@arcz arcz force-pushed the symexec branch 2 times, most recently from 13bf83d to 94f063a Compare June 14, 2023 10:20
@ggrieco-tob
Copy link
Member

Already merged in #1216

@ggrieco-tob ggrieco-tob closed this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants