The mayFollow relation does not correctly capture dataflow dependencies.
Example:
contract A {
address a;
function f() public view returns(address) {
return a;
}
}
contract B {
mapping(address => bool) approved;
mapping(address => bool) modified;
function x(A a) internal returns(address){
return address(a.f());
}
function g(A a) public {
require(approved[x(a)]);
modified[x(a)] = true;
}
}
It does not identify that function x() may follow itself.
A test case is provided inside the broken_dataflow branch (https://github.com/eth-sri/securify/tree/broken_dataflow).
Simply run ./gradlew test to trigger.
The
mayFollowrelation does not correctly capture dataflow dependencies.Example:
It does not identify that function
x()may follow itself.A test case is provided inside the
broken_dataflowbranch (https://github.com/eth-sri/securify/tree/broken_dataflow).Simply run
./gradlew testto trigger.