Skip to content

Symbolic execution PoC#1030

Closed
arcz wants to merge 2 commits intomasterfrom
symexec
Closed

Symbolic execution PoC#1030
arcz wants to merge 2 commits intomasterfrom
symexec

Conversation

@arcz
Copy link
Copy Markdown
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 gustavo-grieco 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
@arcz arcz force-pushed the symexec branch 2 times, most recently from 13bf83d to 94f063a Compare June 14, 2023 10:20
@gustavo-grieco
Copy link
Copy Markdown
Collaborator

Already merged in #1216

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