|
|
@ -1,7 +1,5 @@ |
|
|
|
from laser.ethereum import svm |
|
|
|
from laser.ethereum import svm |
|
|
|
from .ops import * |
|
|
|
from .ops import * |
|
|
|
import re |
|
|
|
|
|
|
|
import logging |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class StateSpace: |
|
|
|
class StateSpace: |
|
|
@ -71,18 +69,15 @@ class StateSpace: |
|
|
|
for index in self.sstors: |
|
|
|
for index in self.sstors: |
|
|
|
for s in self.sstors[index]: |
|
|
|
for s in self.sstors[index]: |
|
|
|
|
|
|
|
|
|
|
|
taint = True |
|
|
|
s.tainted = True |
|
|
|
|
|
|
|
|
|
|
|
# For now we simply 'taint' every storage location that can be written to without any constraint on msg.sender |
|
|
|
# For now we simply 'taint' every storage location that can be written to without any constraint on msg.sender |
|
|
|
|
|
|
|
|
|
|
|
for constraint in s.node.constraints: |
|
|
|
for constraint in s.node.constraints: |
|
|
|
if ("caller" in str(constraint)): |
|
|
|
if ("caller" in str(constraint)): |
|
|
|
taint = False |
|
|
|
s.tainted = False |
|
|
|
break |
|
|
|
break |
|
|
|
|
|
|
|
|
|
|
|
if taint: |
|
|
|
|
|
|
|
s.tainted = True |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def find_storage_write(self, index): |
|
|
|
def find_storage_write(self, index): |
|
|
|
|
|
|
|
|
|
|
|