mirror of https://github.com/ConsenSys/mythril
commit
2a0ff2be91
@ -1,48 +0,0 @@ |
||||
import re |
||||
from typing import List |
||||
from z3 import * |
||||
from mythril.laser.ethereum.transaction import ContractCreationTransaction |
||||
from mythril.laser.ethereum.state.global_state import GlobalState |
||||
|
||||
|
||||
def get_non_creator_constraints(state: GlobalState) -> (List, bool): |
||||
""" |
||||
Get constraints which say that the caller isn't the creator of the contract |
||||
:param state: The state |
||||
:return: tuple of (constraints, bool) where the bool says whether the caller is constrained or not |
||||
""" |
||||
not_creator_constraints = [] |
||||
creator = None |
||||
if isinstance( |
||||
state.world_state.transaction_sequence[0], ContractCreationTransaction |
||||
): |
||||
creator = state.world_state.transaction_sequence[0].caller |
||||
|
||||
if creator is not None: |
||||
for transaction in state.world_state.transaction_sequence[1:]: |
||||
not_creator_constraints.append( |
||||
Not(Extract(159, 0, transaction.caller) == Extract(159, 0, creator)) |
||||
) |
||||
not_creator_constraints.append( |
||||
Not(Extract(159, 0, transaction.caller) == 0) |
||||
) |
||||
else: |
||||
for transaction in state.world_state.transaction_sequence: |
||||
not_creator_constraints.append( |
||||
Not(Extract(159, 0, transaction.caller) == 0) |
||||
) |
||||
if not has_caller_check_constraint(state.mstate.constraints): |
||||
return [], True |
||||
return not_creator_constraints, False |
||||
|
||||
|
||||
def has_caller_check_constraint(constraints: List) -> bool: |
||||
""" |
||||
Checks whether the caller is constrained to a value or not |
||||
""" |
||||
for constraint in constraints: |
||||
if re.search( |
||||
r"caller.*==[0-9]{20}", str(constraint).replace("\n", "").replace(" ", "") |
||||
): |
||||
return False |
||||
return True |
@ -1,218 +1,111 @@ |
||||
from z3 import * |
||||
from mythril.analysis.ops import * |
||||
from mythril.analysis.report import Issue |
||||
from mythril.analysis import solver |
||||
from mythril.analysis.swc_data import REENTRANCY |
||||
from mythril.analysis.modules.base import DetectionModule |
||||
import re |
||||
from mythril.laser.ethereum.state.global_state import GlobalState |
||||
from mythril.exceptions import UnsatError |
||||
import logging |
||||
from mythril.laser.ethereum.cfg import JumpType |
||||
|
||||
DESCRIPTION = """ |
||||
|
||||
class ExternalCallModule(DetectionModule): |
||||
def __init__(self, max_search_depth=64): |
||||
Search for low level calls (e.g. call.value()) that forward all gas to the callee. |
||||
Report a warning if the callee address can be set by the sender, otherwise create |
||||
an informational issue. |
||||
|
||||
""" |
||||
|
||||
|
||||
def _analyze_state(state): |
||||
|
||||
node = state.node |
||||
gas = state.mstate.stack[-1] |
||||
to = state.mstate.stack[-2] |
||||
|
||||
address = state.get_current_instruction()["address"] |
||||
|
||||
try: |
||||
constraints = node.constraints |
||||
transaction_sequence = solver.get_transaction_sequence( |
||||
state, constraints + [UGT(gas, 2300)] |
||||
) |
||||
|
||||
# Check whether we can also set the callee address |
||||
|
||||
try: |
||||
constraints += [to == 0xDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF] |
||||
transaction_sequence = solver.get_transaction_sequence(state, constraints) |
||||
|
||||
debug = str(transaction_sequence) |
||||
description = ( |
||||
"The contract executes a function call with high gas to a user-supplied address. " |
||||
"Note that the callee can contain arbitrary code and may re-enter any function in this contract. " |
||||
"Review the business logic carefully to prevent unanticipated effects on the contract state." |
||||
) |
||||
|
||||
issue = Issue( |
||||
contract=node.contract_name, |
||||
function_name=node.function_name, |
||||
address=address, |
||||
swc_id=REENTRANCY, |
||||
title="External call to user-supplied address", |
||||
_type="Warning", |
||||
bytecode=state.environment.code.bytecode, |
||||
description=description, |
||||
debug=debug, |
||||
gas_used=(state.mstate.min_gas_used, state.mstate.max_gas_used), |
||||
) |
||||
|
||||
except UnsatError: |
||||
|
||||
logging.debug( |
||||
"[EXTERNAL_CALLS] Callee address cannot be modified. Reporting informational issue." |
||||
) |
||||
|
||||
debug = str(transaction_sequence) |
||||
description = ( |
||||
"The contract executes a function call to an external address. " |
||||
"Verify that the code at this address is trusted and immutable." |
||||
) |
||||
|
||||
issue = Issue( |
||||
contract=node.contract_name, |
||||
function_name=state.node.function_name, |
||||
address=address, |
||||
swc_id=REENTRANCY, |
||||
title="External call", |
||||
_type="Informational", |
||||
bytecode=state.environment.code.bytecode, |
||||
description=description, |
||||
debug=debug, |
||||
gas_used=(state.mstate.min_gas_used, state.mstate.max_gas_used), |
||||
) |
||||
|
||||
except UnsatError: |
||||
logging.debug("[EXTERNAL_CALLS] No model found.") |
||||
return [] |
||||
|
||||
return [issue] |
||||
|
||||
|
||||
class ExternalCalls(DetectionModule): |
||||
def __init__(self): |
||||
super().__init__( |
||||
name="External Calls", |
||||
name="External calls", |
||||
swc_id=REENTRANCY, |
||||
hooks=["CALL"], |
||||
description="Check for call.value()() to external addresses", |
||||
description=(DESCRIPTION), |
||||
entrypoint="callback", |
||||
) |
||||
self.max_search_depth = max_search_depth |
||||
self.calls_visited = [] |
||||
|
||||
def search_children( |
||||
self, statespace, node, transaction_id, start_index=0, depth=0, results=None |
||||
): |
||||
if results is None: |
||||
results = [] |
||||
logging.debug("SEARCHING NODE %d", node.uid) |
||||
|
||||
if depth < self.max_search_depth: |
||||
|
||||
n_states = len(node.states) |
||||
|
||||
if n_states > start_index: |
||||
|
||||
for j in range(start_index, n_states): |
||||
if ( |
||||
node.states[j].get_current_instruction()["opcode"] == "SSTORE" |
||||
and node.states[j].current_transaction.id == transaction_id |
||||
): |
||||
results.append( |
||||
node.states[j].get_current_instruction()["address"] |
||||
) |
||||
children = [] |
||||
|
||||
for edge in statespace.edges: |
||||
if edge.node_from == node.uid and edge.type != JumpType.Transaction: |
||||
children.append(statespace.nodes[edge.node_to]) |
||||
|
||||
if len(children): |
||||
for node in children: |
||||
results += self.search_children( |
||||
statespace, |
||||
node, |
||||
transaction_id, |
||||
depth=depth + 1, |
||||
results=results, |
||||
) |
||||
|
||||
return results |
||||
|
||||
def execute(self, statespace): |
||||
|
||||
issues = [] |
||||
|
||||
for call in statespace.calls: |
||||
|
||||
state = call.state |
||||
address = state.get_current_instruction()["address"] |
||||
|
||||
if call.type == "CALL": |
||||
|
||||
logging.debug( |
||||
"[EXTERNAL_CALLS] Call to: %s, value = %s, gas = %s" |
||||
% (str(call.to), str(call.value), str(call.gas)) |
||||
) |
||||
|
||||
if ( |
||||
call.to.type == VarType.SYMBOLIC |
||||
and (call.gas.type == VarType.CONCRETE and call.gas.val > 2300) |
||||
or ( |
||||
call.gas.type == VarType.SYMBOLIC |
||||
and "2300" not in str(call.gas) |
||||
) |
||||
): |
||||
|
||||
description = "This contract executes a message call to " |
||||
|
||||
target = str(call.to) |
||||
user_supplied = False |
||||
|
||||
if "calldata" in target or "caller" in target: |
||||
|
||||
if "calldata" in target: |
||||
description += ( |
||||
"an address provided as a function argument. " |
||||
) |
||||
else: |
||||
description += "the address of the transaction sender. " |
||||
|
||||
user_supplied = True |
||||
else: |
||||
m = re.search(r"storage_([a-z0-9_&^]+)", str(call.to)) |
||||
|
||||
if m: |
||||
idx = m.group(1) |
||||
|
||||
func = statespace.find_storage_write( |
||||
state.environment.active_account.address, idx |
||||
) |
||||
|
||||
if func: |
||||
|
||||
description += ( |
||||
"an address found at storage slot " |
||||
+ str(idx) |
||||
+ ". " |
||||
+ "This storage slot can be written to by calling the function `" |
||||
+ func |
||||
+ "`. " |
||||
) |
||||
user_supplied = True |
||||
|
||||
if user_supplied: |
||||
|
||||
description += ( |
||||
"Generally, it is not recommended to call user-supplied addresses using Solidity's call() construct. " |
||||
"Note that attackers might leverage reentrancy attacks to exploit race conditions or manipulate this contract's state." |
||||
) |
||||
|
||||
issue = Issue( |
||||
contract=call.node.contract_name, |
||||
function_name=call.node.function_name, |
||||
address=address, |
||||
title="Message call to external contract", |
||||
_type="Warning", |
||||
description=description, |
||||
bytecode=state.environment.code.bytecode, |
||||
swc_id=REENTRANCY, |
||||
gas_used=( |
||||
state.mstate.min_gas_used, |
||||
state.mstate.max_gas_used, |
||||
), |
||||
) |
||||
|
||||
else: |
||||
|
||||
description += "to another contract. Make sure that the called contract is trusted and does not execute user-supplied code." |
||||
|
||||
issue = Issue( |
||||
contract=call.node.contract_name, |
||||
function_name=call.node.function_name, |
||||
address=address, |
||||
title="Message call to external contract", |
||||
_type="Informational", |
||||
description=description, |
||||
bytecode=state.environment.code.bytecode, |
||||
swc_id=REENTRANCY, |
||||
gas_used=( |
||||
state.mstate.min_gas_used, |
||||
state.mstate.max_gas_used, |
||||
), |
||||
) |
||||
|
||||
issues.append(issue) |
||||
|
||||
if address not in self.calls_visited: |
||||
self.calls_visited.append(address) |
||||
|
||||
logging.debug( |
||||
"[EXTERNAL_CALLS] Checking for state changes starting from " |
||||
+ call.node.function_name |
||||
) |
||||
|
||||
# Check for SSTORE in remaining instructions in current node & nodes down the CFG |
||||
|
||||
state_change_addresses = self.search_children( |
||||
statespace, |
||||
call.node, |
||||
call.state.current_transaction.id, |
||||
call.state_index + 1, |
||||
depth=0, |
||||
results=[], |
||||
) |
||||
|
||||
logging.debug( |
||||
"[EXTERNAL_CALLS] Detected state changes at addresses: " |
||||
+ str(state_change_addresses) |
||||
) |
||||
|
||||
if len(state_change_addresses): |
||||
for address in state_change_addresses: |
||||
description = ( |
||||
"The contract account state is changed after an external call. " |
||||
"Consider that the called contract could re-enter the function before this " |
||||
"state change takes place. This can lead to business logic vulnerabilities." |
||||
) |
||||
|
||||
issue = Issue( |
||||
contract=call.node.contract_name, |
||||
function_name=call.node.function_name, |
||||
address=address, |
||||
title="State change after external call", |
||||
_type="Warning", |
||||
description=description, |
||||
bytecode=state.environment.code.bytecode, |
||||
swc_id=REENTRANCY, |
||||
gas_used=( |
||||
state.mstate.min_gas_used, |
||||
state.mstate.max_gas_used, |
||||
), |
||||
) |
||||
issues.append(issue) |
||||
|
||||
return issues |
||||
|
||||
|
||||
detector = ExternalCallModule() |
||||
self._issues = [] |
||||
|
||||
def execute(self, state: GlobalState): |
||||
self._issues.extend(_analyze_state(state)) |
||||
return self.issues |
||||
|
||||
@property |
||||
def issues(self): |
||||
return self._issues |
||||
|
||||
|
||||
detector = ExternalCalls() |
||||
|
@ -1,3 +1,3 @@ |
||||
# This file is suitable for sourcing inside POSIX shell, e.g. bash as |
||||
# well as for importing into Python |
||||
VERSION = "v0.19.7" # NOQA |
||||
VERSION = "v0.19.8" # NOQA |
||||
|
@ -1,268 +0,0 @@ |
||||
from mythril.analysis.modules.delegatecall import detector |
||||
from mythril.analysis.ops import Call, Variable, VarType |
||||
from mythril.analysis.symbolic import SymExecWrapper |
||||
from mythril.laser.ethereum.cfg import Node |
||||
from mythril.laser.ethereum.state.environment import Environment |
||||
from mythril.laser.ethereum.state.account import Account |
||||
from mythril.laser.ethereum.state.global_state import GlobalState |
||||
import pytest |
||||
from unittest.mock import MagicMock, patch |
||||
import pytest_mock |
||||
from mythril.disassembler.disassembly import Disassembly |
||||
|
||||
|
||||
def test_concrete_call(): |
||||
# arrange |
||||
address = "0x10" |
||||
active_account = Account(address) |
||||
active_account.code = Disassembly("00") |
||||
environment = Environment(active_account, None, None, None, None, None) |
||||
|
||||
state = GlobalState(None, environment, None) |
||||
state.mstate.memory = ["placeholder", "calldata_bling_0"] |
||||
|
||||
node = Node("example") |
||||
node.contract_name = "the contract name" |
||||
node.function_name = "the function name" |
||||
|
||||
to = Variable(1, VarType.CONCRETE) |
||||
meminstart = Variable(1, VarType.CONCRETE) |
||||
call = Call(node, state, None, None, to, None) |
||||
|
||||
# act |
||||
issues = detector._concrete_call(call, state, address, meminstart) |
||||
|
||||
# assert |
||||
issue = issues[0] |
||||
assert issue.address == address |
||||
assert issue.contract == node.contract_name |
||||
assert issue.function == node.function_name |
||||
assert issue.title == "Call data forwarded with delegatecall()" |
||||
assert issue.type == "Informational" |
||||
assert ( |
||||
issue.description |
||||
== "This contract forwards its call data via DELEGATECALL in its fallback function." |
||||
" This means that any function in the called contract can be executed." |
||||
" Note that the callee contract will have access to the storage of the " |
||||
"calling contract.\nDELEGATECALL target: 0x1" |
||||
) |
||||
|
||||
|
||||
def test_concrete_call_symbolic_to(): |
||||
# arrange |
||||
address = "0x10" |
||||
|
||||
active_account = Account(address) |
||||
active_account.code = Disassembly("00") |
||||
environment = Environment(active_account, None, None, None, None, None) |
||||
state = GlobalState(None, environment, None) |
||||
state.mstate.memory = ["placeholder", "calldata_bling_0"] |
||||
|
||||
node = Node("example") |
||||
node.contract_name = "the contract name" |
||||
node.function_name = "the function name" |
||||
|
||||
to = Variable("calldata_3", VarType.SYMBOLIC) |
||||
meminstart = Variable(1, VarType.CONCRETE) |
||||
call = Call(node, state, None, None, to, None) |
||||
|
||||
# act |
||||
issues = detector._concrete_call(call, state, address, meminstart) |
||||
|
||||
# assert |
||||
issue = issues[0] |
||||
assert issue.address == address |
||||
assert issue.contract == node.contract_name |
||||
assert issue.function == node.function_name |
||||
assert issue.title == "Call data forwarded with delegatecall()" |
||||
assert issue.type == "Informational" |
||||
assert issue.description == ( |
||||
"This contract forwards its call data via DELEGATECALL in its fallback function." |
||||
" This means that any function in the called contract can be executed." |
||||
" Note that the callee contract will have access to the storage of the " |
||||
"calling contract.\nDELEGATECALL target: calldata_3" |
||||
) |
||||
|
||||
|
||||
def test_concrete_call_not_calldata(): |
||||
# arrange |
||||
state = GlobalState(None, None, None) |
||||
state.mstate.memory = ["placeholder", "not_calldata"] |
||||
meminstart = Variable(1, VarType.CONCRETE) |
||||
|
||||
# act |
||||
issues = detector._concrete_call(None, state, None, meminstart) |
||||
|
||||
# assert |
||||
assert issues == [] |
||||
|
||||
|
||||
def test_symbolic_call_storage_to(mocker): |
||||
# arrange |
||||
address = "0x10" |
||||
|
||||
active_account = Account(address) |
||||
active_account.code = Disassembly("00") |
||||
environment = Environment(active_account, None, None, None, None, None) |
||||
state = GlobalState(None, environment, None) |
||||
state.mstate.memory = ["placeholder", "calldata_bling_0"] |
||||
|
||||
node = Node("example") |
||||
node.contract_name = "the contract name" |
||||
node.function_name = "the function name" |
||||
|
||||
to = Variable("storage_1", VarType.SYMBOLIC) |
||||
call = Call(node, state, None, "Type: ", to, None) |
||||
|
||||
mocker.patch.object(SymExecWrapper, "__init__", lambda x, y: None) |
||||
statespace = SymExecWrapper(1) |
||||
|
||||
mocker.patch.object(statespace, "find_storage_write") |
||||
statespace.find_storage_write.return_value = "Function name" |
||||
|
||||
# act |
||||
issues = detector._symbolic_call(call, state, address, statespace) |
||||
|
||||
# assert |
||||
issue = issues[0] |
||||
assert issue.address == address |
||||
assert issue.contract == node.contract_name |
||||
assert issue.function == node.function_name |
||||
assert issue.title == "Type: to a user-supplied address" |
||||
assert issue.type == "Informational" |
||||
assert issue.description == ( |
||||
"This contract delegates execution to a contract address in storage slot 1." |
||||
" This storage slot can be written to by calling the function `Function name`." |
||||
" Be aware that the called contract gets unrestricted access to this contract's state." |
||||
) |
||||
|
||||
|
||||
def test_symbolic_call_calldata_to(mocker): |
||||
# arrange |
||||
address = "0x10" |
||||
|
||||
active_account = Account(address) |
||||
active_account.code = Disassembly("00") |
||||
environment = Environment(active_account, None, None, None, None, None) |
||||
state = GlobalState(None, environment, None) |
||||
state.mstate.memory = ["placeholder", "calldata_bling_0"] |
||||
|
||||
node = Node("example") |
||||
node.contract_name = "the contract name" |
||||
node.function_name = "the function name" |
||||
|
||||
to = Variable("calldata", VarType.SYMBOLIC) |
||||
call = Call(node, state, None, "Type: ", to, None) |
||||
|
||||
mocker.patch.object(SymExecWrapper, "__init__", lambda x, y: None) |
||||
statespace = SymExecWrapper(1) |
||||
|
||||
mocker.patch.object(statespace, "find_storage_write") |
||||
statespace.find_storage_write.return_value = "Function name" |
||||
|
||||
# act |
||||
issues = detector._symbolic_call(call, state, address, statespace) |
||||
|
||||
# assert |
||||
issue = issues[0] |
||||
assert issue.address == address |
||||
assert issue.contract == node.contract_name |
||||
assert issue.function == node.function_name |
||||
assert issue.title == "Type: to a user-supplied address" |
||||
assert issue.type == "Informational" |
||||
assert issue.description == ( |
||||
"This contract delegates execution to a contract address obtained from calldata." |
||||
" Be aware that the called contract gets unrestricted access to this contract's state." |
||||
) |
||||
|
||||
|
||||
@patch("mythril.laser.ethereum.state.global_state.GlobalState.get_current_instruction") |
||||
@patch("mythril.analysis.modules.delegatecall.detector._concrete_call") |
||||
@patch("mythril.analysis.modules.delegatecall.detector._symbolic_call") |
||||
def test_delegate_call(sym_mock, concrete_mock, curr_instruction): |
||||
# arrange |
||||
# sym_mock = mocker.patch.object(delegatecall, "_symbolic_call") |
||||
# concrete_mock = mocker.patch.object(delegatecall, "_concrete_call") |
||||
sym_mock.return_value = [] |
||||
concrete_mock.return_value = [] |
||||
curr_instruction.return_value = {"address": "0x10"} |
||||
|
||||
active_account = Account("0x10") |
||||
active_account.code = Disassembly("00") |
||||
|
||||
environment = Environment(active_account, None, None, None, None, None) |
||||
state = GlobalState(None, environment, Node) |
||||
state.mstate.memory = ["placeholder", "calldata_bling_0"] |
||||
state.mstate.stack = [1, 2, 3] |
||||
assert state.get_current_instruction() == {"address": "0x10"} |
||||
|
||||
node = Node("example") |
||||
node.contract_name = "the contract name" |
||||
node.function_name = "fallback" |
||||
|
||||
to = Variable("storage_1", VarType.SYMBOLIC) |
||||
call = Call(node, state, None, "DELEGATECALL", to, None) |
||||
|
||||
statespace = MagicMock() |
||||
statespace.calls = [call] |
||||
|
||||
# act |
||||
detector.execute(statespace) |
||||
|
||||
# assert |
||||
assert concrete_mock.call_count == 1 |
||||
assert sym_mock.call_count == 1 |
||||
|
||||
|
||||
@patch("mythril.analysis.modules.delegatecall.detector._concrete_call") |
||||
@patch("mythril.analysis.modules.delegatecall.detector._symbolic_call") |
||||
def test_delegate_call_not_delegate(sym_mock, concrete_mock): |
||||
# arrange |
||||
# sym_mock = mocker.patch.object(delegatecall, "_symbolic_call") |
||||
# concrete_mock = mocker.patch.object(delegatecall, "_concrete_call") |
||||
sym_mock.return_value = [] |
||||
concrete_mock.return_value = [] |
||||
|
||||
node = Node("example") |
||||
node.function_name = "fallback" |
||||
|
||||
to = Variable("storage_1", VarType.SYMBOLIC) |
||||
call = Call(node, None, None, "NOT_DELEGATECALL", to, None) |
||||
|
||||
statespace = MagicMock() |
||||
statespace.calls = [call] |
||||
|
||||
# act |
||||
issues = detector.execute(statespace) |
||||
|
||||
# assert |
||||
assert issues == [] |
||||
assert concrete_mock.call_count == 0 |
||||
assert sym_mock.call_count == 0 |
||||
|
||||
|
||||
@patch("mythril.analysis.modules.delegatecall.detector._concrete_call") |
||||
@patch("mythril.analysis.modules.delegatecall.detector._symbolic_call") |
||||
def test_delegate_call_not_fallback(sym_mock, concrete_mock): |
||||
# arrange |
||||
# sym_mock = mocker.patch.object(delegatecall, "_symbolic_call") |
||||
# concrete_mock = mocker.patch.object(delegatecall, "_concrete_call") |
||||
sym_mock.return_value = [] |
||||
concrete_mock.return_value = [] |
||||
|
||||
node = Node("example") |
||||
node.function_name = "not_fallback" |
||||
|
||||
to = Variable("storage_1", VarType.SYMBOLIC) |
||||
call = Call(node, None, None, "DELEGATECALL", to, None) |
||||
|
||||
statespace = MagicMock() |
||||
statespace.calls = [call] |
||||
|
||||
# act |
||||
issues = detector.execute(statespace) |
||||
|
||||
# assert |
||||
assert issues == [] |
||||
assert concrete_mock.call_count == 0 |
||||
assert sym_mock.call_count == 0 |
@ -1,126 +1 @@ |
||||
{ |
||||
"error": null, |
||||
"issues": [ |
||||
{ |
||||
"address": 661, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "This contract executes a message call to to another contract. Make sure that the called contract is trusted and does not execute user-supplied code.", |
||||
"function": "thisisfine()", |
||||
"swc-id": "107", |
||||
"min_gas_used": 643, |
||||
"max_gas_used": 1254, |
||||
"title": "Message call to external contract", |
||||
"type": "Informational" |
||||
}, |
||||
{ |
||||
"address": 666, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", |
||||
"function": "thisisfine()", |
||||
"swc-id": "104", |
||||
"min_gas_used": 1352, |
||||
"max_gas_used": 35963, |
||||
"title": "Unchecked CALL return value", |
||||
"type": "Informational" |
||||
}, |
||||
{ |
||||
"address": 779, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "This contract executes a message call to an address found at storage slot 1. This storage slot can be written to by calling the function `setstoredaddress(address)`. Generally, it is not recommended to call user-supplied addresses using Solidity's call() construct. Note that attackers might leverage reentrancy attacks to exploit race conditions or manipulate this contract's state.", |
||||
"function": "callstoredaddress()", |
||||
"swc-id": "107", |
||||
"min_gas_used": 687, |
||||
"max_gas_used": 1298, |
||||
"title": "Message call to external contract", |
||||
"type": "Warning" |
||||
}, |
||||
{ |
||||
"address": 779, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "Possible transaction order dependence vulnerability: The value or direction of the call statement is determined from a tainted storage location.", |
||||
"function": "callstoredaddress()", |
||||
"swc-id": "114", |
||||
"min_gas_used": 687, |
||||
"max_gas_used": 1298, |
||||
"title": "Transaction order dependence", |
||||
"type": "Warning" |
||||
}, |
||||
{ |
||||
"address": 784, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", |
||||
"function": "callstoredaddress()", |
||||
"swc-id": "104", |
||||
"min_gas_used": 1396, |
||||
"max_gas_used": 36007, |
||||
"title": "Unchecked CALL return value", |
||||
"type": "Informational" |
||||
}, |
||||
{ |
||||
"address": 858, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "This contract executes a message call to to another contract. Make sure that the called contract is trusted and does not execute user-supplied code.", |
||||
"function": "reentrancy()", |
||||
"swc-id": "107", |
||||
"min_gas_used": 709, |
||||
"max_gas_used": 1320, |
||||
"title": "Message call to external contract", |
||||
"type": "Informational" |
||||
}, |
||||
{ |
||||
"address": 869, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "The contract account state is changed after an external call. Consider that the called contract could re-enter the function before this state change takes place. This can lead to business logic vulnerabilities.", |
||||
"function": "reentrancy()", |
||||
"swc-id": "107", |
||||
"min_gas_used": 709, |
||||
"max_gas_used": 1320, |
||||
"title": "State change after external call", |
||||
"type": "Warning" |
||||
}, |
||||
{ |
||||
"address": 871, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", |
||||
"function": "reentrancy()", |
||||
"swc-id": "104", |
||||
"min_gas_used": 6432, |
||||
"max_gas_used": 61043, |
||||
"title": "Unchecked CALL return value", |
||||
"type": "Informational" |
||||
}, |
||||
{ |
||||
"address": 912, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "This contract executes a message call to an address provided as a function argument. Generally, it is not recommended to call user-supplied addresses using Solidity's call() construct. Note that attackers might leverage reentrancy attacks to exploit race conditions or manipulate this contract's state.", |
||||
"function": "calluseraddress(address)", |
||||
"swc-id": "107", |
||||
"min_gas_used": 335, |
||||
"max_gas_used": 616, |
||||
"title": "Message call to external contract", |
||||
"type": "Warning" |
||||
}, |
||||
{ |
||||
"address": 918, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", |
||||
"function": "calluseraddress(address)", |
||||
"swc-id": "104", |
||||
"min_gas_used": 1046, |
||||
"max_gas_used": 35327, |
||||
"title": "Unchecked CALL return value", |
||||
"type": "Informational" |
||||
} |
||||
], |
||||
"success": true |
||||
} |
||||
{"error": null, "issues": [{"address": 661, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The contract executes a function call to an external address. Verify that the code at this address is trusted and immutable.", "function": "thisisfine()", "max_gas_used": 1254, "min_gas_used": 643, "swc-id": "107", "title": "External call", "type": "Informational"}, {"address": 666, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", "function": "thisisfine()", "max_gas_used": 35963, "min_gas_used": 1352, "swc-id": "104", "title": "Unchecked CALL return value", "type": "Informational"}, {"address": 779, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The contract executes a function call to an external address. Verify that the code at this address is trusted and immutable.", "function": "callstoredaddress()", "max_gas_used": 1298, "min_gas_used": 687, "swc-id": "107", "title": "External call", "type": "Informational"}, {"address": 784, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", "function": "callstoredaddress()", "max_gas_used": 36007, "min_gas_used": 1396, "swc-id": "104", "title": "Unchecked CALL return value", "type": "Informational"}, {"address": 858, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The contract executes a function call to an external address. Verify that the code at this address is trusted and immutable.", "function": "reentrancy()", "max_gas_used": 1320, "min_gas_used": 709, "swc-id": "107", "title": "External call", "type": "Informational"}, {"address": 871, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", "function": "reentrancy()", "max_gas_used": 61043, "min_gas_used": 6432, "swc-id": "104", "title": "Unchecked CALL return value", "type": "Informational"}, {"address": 912, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The contract executes a function call with high gas to a user-supplied address. Note that the callee can contain arbitrary code and may re-enter any function in this contract. Review the business logic carefully to prevent unanticipated effects on the contract state.", "function": "calluseraddress(address)", "max_gas_used": 616, "min_gas_used": 335, "swc-id": "107", "title": "External call to user-supplied address", "type": "Warning"}, {"address": 918, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", "function": "calluseraddress(address)", "max_gas_used": 35327, "min_gas_used": 1046, "swc-id": "104", "title": "Unchecked CALL return value", "type": "Informational"}], "success": true} |
@ -1,36 +1,36 @@ |
||||
{ |
||||
"error": null, |
||||
"issues": [ |
||||
{ |
||||
"address": 158, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "The arithmetic operation can result in integer overflow.\n", |
||||
"function": "_function_0x83f12fec", |
||||
"swc-id": "101", |
||||
"title": "Integer Overflow", |
||||
"type": "Warning" |
||||
}, |
||||
{ |
||||
"address": 278, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "The arithmetic operation can result in integer overflow.\n", |
||||
"function": "_function_0x83f12fec", |
||||
"swc-id": "101", |
||||
"title": "Integer Overflow", |
||||
"type": "Warning" |
||||
}, |
||||
{ |
||||
"address": 378, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "The substraction can result in an integer underflow.\n", |
||||
"function": "_function_0x83f12fec", |
||||
"swc-id": "101", |
||||
"title": "Integer Underflow", |
||||
"type": "Warning" |
||||
} |
||||
], |
||||
"success": true |
||||
"error": null, |
||||
"issues": [ |
||||
{ |
||||
"address": 158, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "The arithmetic operation can result in integer overflow.\n", |
||||
"function": "_function_0x83f12fec", |
||||
"swc-id": "101", |
||||
"title": "Integer Overflow", |
||||
"type": "Warning", |
||||
}, |
||||
{ |
||||
"address": 278, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "The arithmetic operation can result in integer overflow.\n", |
||||
"function": "_function_0x83f12fec", |
||||
"swc-id": "101", |
||||
"title": "Integer Overflow", |
||||
"type": "Warning", |
||||
}, |
||||
{ |
||||
"address": 378, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "The substraction can result in an integer underflow.\n", |
||||
"function": "_function_0x83f12fec", |
||||
"swc-id": "101", |
||||
"title": "Integer Underflow", |
||||
"type": "Warning", |
||||
}, |
||||
], |
||||
"success": true, |
||||
} |
||||
|
@ -1,30 +1,5 @@ |
||||
{ |
||||
"error": null, |
||||
"issues": [ |
||||
{ |
||||
"address": 722, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "Arbitrary senders other than the contract creator can withdraw ETH from the contract account without previously having sent an equivalent amount of ETH to it. This is likely to be a vulnerability.", |
||||
"function": "withdrawfunds()", |
||||
"max_gas_used": 1749, |
||||
"min_gas_used": 1138, |
||||
"swc-id": "105", |
||||
"title": "Ether thief", |
||||
"type": "Warning" |
||||
}, |
||||
{ |
||||
"address": 883, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "This binary add operation can result in integer overflow.\n", |
||||
"function": "invest()", |
||||
"max_gas_used": 1856, |
||||
"min_gas_used": 1571, |
||||
"swc-id": "101", |
||||
"title": "Integer Overflow", |
||||
"type": "Warning" |
||||
} |
||||
], |
||||
"issues": [], |
||||
"success": true |
||||
} |
||||
|
@ -1,25 +1,3 @@ |
||||
# Analysis results for test-filename.sol |
||||
# Analysis results for None |
||||
|
||||
## Ether thief |
||||
- SWC ID: 105 |
||||
- Type: Warning |
||||
- Contract: Unknown |
||||
- Function name: `withdrawfunds()` |
||||
- PC address: 722 |
||||
- Estimated Gas Usage: 1138 - 1749 |
||||
|
||||
### Description |
||||
|
||||
Arbitrary senders other than the contract creator can withdraw ETH from the contract account without previously having sent an equivalent amount of ETH to it. This is likely to be a vulnerability. |
||||
|
||||
## Integer Overflow |
||||
- SWC ID: 101 |
||||
- Type: Warning |
||||
- Contract: Unknown |
||||
- Function name: `invest()` |
||||
- PC address: 883 |
||||
- Estimated Gas Usage: 1571 - 1856 |
||||
|
||||
### Description |
||||
|
||||
This binary add operation can result in integer overflow. |
||||
The analysis was completed successfully. No issues were detected. |
||||
|
@ -1,21 +1 @@ |
||||
==== Ether thief ==== |
||||
SWC ID: 105 |
||||
Type: Warning |
||||
Contract: Unknown |
||||
Function name: withdrawfunds() |
||||
PC address: 722 |
||||
Estimated Gas Usage: 1138 - 1749 |
||||
Arbitrary senders other than the contract creator can withdraw ETH from the contract account without previously having sent an equivalent amount of ETH to it. This is likely to be a vulnerability. |
||||
-------------------- |
||||
|
||||
==== Integer Overflow ==== |
||||
SWC ID: 101 |
||||
Type: Warning |
||||
Contract: Unknown |
||||
Function name: invest() |
||||
PC address: 883 |
||||
Estimated Gas Usage: 1571 - 1856 |
||||
This binary add operation can result in integer overflow. |
||||
|
||||
-------------------- |
||||
|
||||
The analysis was completed successfully. No issues were detected. |
||||
|
@ -1,42 +1 @@ |
||||
{ |
||||
"error": null, |
||||
"issues": [ |
||||
{ |
||||
"address": 196, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "This contract executes a message call to to another contract. Make sure that the called contract is trusted and does not execute user-supplied code.", |
||||
"function": "callchecked()", |
||||
"swc-id": "107", |
||||
"min_gas_used": 599, |
||||
"max_gas_used": 1210, |
||||
"title": "Message call to external contract", |
||||
"type": "Informational" |
||||
}, |
||||
{ |
||||
"address": 285, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "This contract executes a message call to to another contract. Make sure that the called contract is trusted and does not execute user-supplied code.", |
||||
"function": "callnotchecked()", |
||||
"swc-id": "107", |
||||
"min_gas_used": 621, |
||||
"max_gas_used": 1232, |
||||
"title": "Message call to external contract", |
||||
"type": "Informational" |
||||
}, |
||||
{ |
||||
"address": 290, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", |
||||
"function": "callnotchecked()", |
||||
"swc-id": "104", |
||||
"min_gas_used": 1330, |
||||
"max_gas_used": 35941, |
||||
"title": "Unchecked CALL return value", |
||||
"type": "Informational" |
||||
} |
||||
], |
||||
"success": true |
||||
} |
||||
{"error": null, "issues": [{"address": 196, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The contract executes a function call to an external address. Verify that the code at this address is trusted and immutable.", "function": "callchecked()", "max_gas_used": 1210, "min_gas_used": 599, "swc-id": "107", "title": "External call", "type": "Informational"}, {"address": 285, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The contract executes a function call to an external address. Verify that the code at this address is trusted and immutable.", "function": "callnotchecked()", "max_gas_used": 1232, "min_gas_used": 621, "swc-id": "107", "title": "External call", "type": "Informational"}, {"address": 290, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", "function": "callnotchecked()", "max_gas_used": 35941, "min_gas_used": 1330, "swc-id": "104", "title": "Unchecked CALL return value", "type": "Informational"}], "success": true} |
@ -1,166 +1,166 @@ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"issues": [ |
||||
{ |
||||
"title": "Ether send", |
||||
"description": "In the function `_function_0x4229616d` a non-zero amount of Ether is sent to an address taken from storage slot 5.\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\n\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.", |
||||
"function": "_function_0x4229616d", |
||||
"type": "Warning", |
||||
"address": 1599, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Ether send", |
||||
"description": "In the function `_function_0xb4022950` a non-zero amount of Ether is sent to an address taken from storage slot 5.\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\n\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.", |
||||
"function": "_function_0xb4022950", |
||||
"type": "Warning", |
||||
"address": 1940, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Ether send", |
||||
"description": "In the function `_function_0xb4022950` a non-zero amount of Ether is sent to an address taken from storage slot 5.\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\n\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.", |
||||
"function": "_function_0xb4022950", |
||||
"type": "Warning", |
||||
"address": 2582, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Exception state", |
||||
"description": "A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. ", |
||||
"function": "_function_0x57d4021b", |
||||
"type": "Informational", |
||||
"address": 1653, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Exception state", |
||||
"description": "A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. ", |
||||
"function": "_function_0x9dbc4f9b", |
||||
"type": "Informational", |
||||
"address": 2085, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "fallback", |
||||
"type": "Informational", |
||||
"address": 3111, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "fallback", |
||||
"type": "Informational", |
||||
"address": 3140, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "fallback", |
||||
"type": "Informational", |
||||
"address": 2950, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "fallback", |
||||
"type": "Informational", |
||||
"address": 1268, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x09dfdc71", |
||||
"type": "Informational", |
||||
"address": 310, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x09dfdc71", |
||||
"type": "Informational", |
||||
"address": 1316, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x253459e3", |
||||
"type": "Informational", |
||||
"address": 1375, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x4229616d", |
||||
"type": "Informational", |
||||
"address": 1511, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x57d4021b", |
||||
"type": "Informational", |
||||
"address": 1679, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x6fbaaa1e", |
||||
"type": "Informational", |
||||
"address": 618, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x8a5fb3ca", |
||||
"type": "Informational", |
||||
"address": 805, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x9dbc4f9b", |
||||
"type": "Informational", |
||||
"address": 2187, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Unchecked CALL return value", |
||||
"description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", |
||||
"function": "_function_0x4229616d", |
||||
"type": "Informational", |
||||
"address": 1599, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Unchecked CALL return value", |
||||
"description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", |
||||
"function": "_function_0xb4022950", |
||||
"type": "Informational", |
||||
"address": 1940, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Unchecked CALL return value", |
||||
"description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", |
||||
"function": "_function_0xb4022950", |
||||
"type": "Informational", |
||||
"address": 2582, |
||||
"debug": "<DEBUG-DATA>" |
||||
} |
||||
] |
||||
"success": true, |
||||
"error": null, |
||||
"issues": [ |
||||
{ |
||||
"title": "Ether send", |
||||
"description": "In the function `_function_0x4229616d` a non-zero amount of Ether is sent to an address taken from storage slot 5.\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\n\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.", |
||||
"function": "_function_0x4229616d", |
||||
"type": "Warning", |
||||
"address": 1599, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Ether send", |
||||
"description": "In the function `_function_0xb4022950` a non-zero amount of Ether is sent to an address taken from storage slot 5.\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\n\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.", |
||||
"function": "_function_0xb4022950", |
||||
"type": "Warning", |
||||
"address": 1940, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Ether send", |
||||
"description": "In the function `_function_0xb4022950` a non-zero amount of Ether is sent to an address taken from storage slot 5.\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\n\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.\nThere is a check on storage index 5. This storage slot can be written to by calling the function `_function_0x67f809e9`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.", |
||||
"function": "_function_0xb4022950", |
||||
"type": "Warning", |
||||
"address": 2582, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Exception state", |
||||
"description": "A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. ", |
||||
"function": "_function_0x57d4021b", |
||||
"type": "Informational", |
||||
"address": 1653, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Exception state", |
||||
"description": "A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. ", |
||||
"function": "_function_0x9dbc4f9b", |
||||
"type": "Informational", |
||||
"address": 2085, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "fallback", |
||||
"type": "Informational", |
||||
"address": 3111, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "fallback", |
||||
"type": "Informational", |
||||
"address": 3140, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "fallback", |
||||
"type": "Informational", |
||||
"address": 2950, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "fallback", |
||||
"type": "Informational", |
||||
"address": 1268, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x09dfdc71", |
||||
"type": "Informational", |
||||
"address": 310, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x09dfdc71", |
||||
"type": "Informational", |
||||
"address": 1316, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x253459e3", |
||||
"type": "Informational", |
||||
"address": 1375, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x4229616d", |
||||
"type": "Informational", |
||||
"address": 1511, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x57d4021b", |
||||
"type": "Informational", |
||||
"address": 1679, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x6fbaaa1e", |
||||
"type": "Informational", |
||||
"address": 618, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x8a5fb3ca", |
||||
"type": "Informational", |
||||
"address": 805, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Invariant branch condition", |
||||
"description": "Found a conditional jump which always follows the same branch", |
||||
"function": "_function_0x9dbc4f9b", |
||||
"type": "Informational", |
||||
"address": 2187, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Unchecked CALL return value", |
||||
"description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", |
||||
"function": "_function_0x4229616d", |
||||
"type": "Informational", |
||||
"address": 1599, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Unchecked CALL return value", |
||||
"description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", |
||||
"function": "_function_0xb4022950", |
||||
"type": "Informational", |
||||
"address": 1940, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Unchecked CALL return value", |
||||
"description": "The return value of an external call is not checked. Note that execution continue even if the called contract throws.", |
||||
"function": "_function_0xb4022950", |
||||
"type": "Informational", |
||||
"address": 2582, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
], |
||||
} |
||||
|
@ -1 +1,18 @@ |
||||
{"error": null, "issues": [{"address": 146, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "Anyone can kill this contract and withdraw its balance to their own account.", "function": "kill(address)", "max_gas_used": 263, "min_gas_used": 168, "swc-id": "106", "title": "Unchecked SUICIDE", "type": "Warning"}], "success": true} |
||||
{ |
||||
"error": null, |
||||
"issues": [ |
||||
{ |
||||
"address": 146, |
||||
"contract": "Unknown", |
||||
"debug": "<DEBUG-DATA>", |
||||
"description": "Anyone can kill this contract and withdraw its balance to their own account.", |
||||
"function": "kill(address)", |
||||
"max_gas_used": 263, |
||||
"min_gas_used": 168, |
||||
"swc-id": "106", |
||||
"title": "Unchecked SUICIDE", |
||||
"type": "Warning" |
||||
} |
||||
], |
||||
"success": true |
||||
} |
||||
|
@ -1,46 +1,46 @@ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"issues": [ |
||||
{ |
||||
"title": "Dependence on predictable environment variable", |
||||
"description": "In the function `_function_0xe9874106` the following predictable state variables are used to determine Ether recipient:\n- block.coinbase\n", |
||||
"function": "_function_0xe9874106", |
||||
"type": "Warning", |
||||
"address": 1285, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Ether send", |
||||
"description": "In the function `_function_0xe9874106` a non-zero amount of Ether is sent to an address taken from storage slot 0.\nThere is a check on storage index 0. This storage slot can be written to by calling the function `fallback`.\n\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.", |
||||
"function": "_function_0xe9874106", |
||||
"type": "Warning", |
||||
"address": 1285, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Exception state", |
||||
"description": "A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. ", |
||||
"function": "fallback", |
||||
"type": "Informational", |
||||
"address": 356, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Exception state", |
||||
"description": "A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. ", |
||||
"function": "_function_0xe9874106", |
||||
"type": "Informational", |
||||
"address": 146, |
||||
"debug": "<DEBUG-DATA>" |
||||
}, |
||||
{ |
||||
"title": "Transaction order dependence", |
||||
"description": "A possible transaction order independence vulnerability exists in function _function_0xe9874106. The value or direction of the call statement is determined from a tainted storage location", |
||||
"function": "_function_0xe9874106", |
||||
"type": "Warning", |
||||
"address": 1285, |
||||
"debug": "<DEBUG-DATA>" |
||||
} |
||||
] |
||||
"success": true, |
||||
"error": null, |
||||
"issues": [ |
||||
{ |
||||
"title": "Dependence on predictable environment variable", |
||||
"description": "In the function `_function_0xe9874106` the following predictable state variables are used to determine Ether recipient:\n- block.coinbase\n", |
||||
"function": "_function_0xe9874106", |
||||
"type": "Warning", |
||||
"address": 1285, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Ether send", |
||||
"description": "In the function `_function_0xe9874106` a non-zero amount of Ether is sent to an address taken from storage slot 0.\nThere is a check on storage index 0. This storage slot can be written to by calling the function `fallback`.\n\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.", |
||||
"function": "_function_0xe9874106", |
||||
"type": "Warning", |
||||
"address": 1285, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Exception state", |
||||
"description": "A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. ", |
||||
"function": "fallback", |
||||
"type": "Informational", |
||||
"address": 356, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Exception state", |
||||
"description": "A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. ", |
||||
"function": "_function_0xe9874106", |
||||
"type": "Informational", |
||||
"address": 146, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
{ |
||||
"title": "Transaction order dependence", |
||||
"description": "A possible transaction order independence vulnerability exists in function _function_0xe9874106. The value or direction of the call statement is determined from a tainted storage location", |
||||
"function": "_function_0xe9874106", |
||||
"type": "Warning", |
||||
"address": 1285, |
||||
"debug": "<DEBUG-DATA>", |
||||
}, |
||||
], |
||||
} |
||||
|
Loading…
Reference in new issue