{"action":"created","issue":{"url":"https://api.github.com/repos/trailofbits/manticore/issues/1178","repository_url":"https://api.github.com/repos/trailofbits/manticore","labels_url":"https://api.github.com/repos/trailofbits/manticore/issues/1178/labels{/name}","comments_url":"https://api.github.com/repos/trailofbits/manticore/issues/1178/comments","events_url":"https://api.github.com/repos/trailofbits/manticore/issues/1178/events","html_url":"https://github.com/trailofbits/manticore/issues/1178","id":367714652,"node_id":"MDU6SXNzdWUzNjc3MTQ2NTI=","number":1178,"title":"Check call signature counts in an manticore.ethereum.EVMContract call ? ","user":{"login":"rocky","id":8851,"node_id":"MDQ6VXNlcjg4NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/8851?v=4","gravatar_id":"","url":"https://api.github.com/users/rocky","html_url":"https://github.com/rocky","followers_url":"https://api.github.com/users/rocky/followers","following_url":"https://api.github.com/users/rocky/following{/other_user}","gists_url":"https://api.github.com/users/rocky/gists{/gist_id}","starred_url":"https://api.github.com/users/rocky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocky/subscriptions","organizations_url":"https://api.github.com/users/rocky/orgs","repos_url":"https://api.github.com/users/rocky/repos","events_url":"https://api.github.com/users/rocky/events{/privacy}","received_events_url":"https://api.github.com/users/rocky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-08T09:53:02Z","updated_at":"2018-10-08T17:42:43Z","closed_at":null,"author_association":"NONE","body":"### OS / Environment\r\n<!--- lsb_release -a --->\r\nmacOS High Sierra\r\n### Manticore version\r\n<!--- pip show manticore | grep Version --->\r\n\r\nVersion: 0.2.1.1\r\n\r\n### Python version\r\n<!--- python --version --->\r\n\r\nPython 3.3.6\r\n### Dependencies\r\n<!--- pip freeze --->\r\n\r\n\r\n### Summary of the problem\r\n\r\nWhen a Solidity function is called in a `manticore.ethereum.EVMContract` object, the parameter count of the function is not checked. \r\n### Step to reproduce the behavior\r\n\r\nThis contract from the  trufflecon2018 manticore example: \r\n\r\n```solidity\r\npragma solidity^0.4.24;\r\ncontract Overflow {\r\n    uint public sellerBalance=0;\r\n\r\n    function add(uint value) public returns (bool){\r\n        sellerBalance += value; // complicated math, possible overflow\r\n    }\r\n}\r\n```\r\n\r\nNow here is an improper use of the call `add`, since there are two parameters\r\n\r\n```python\r\nfrom manticore.ethereum import ManticoreEVM\r\nm = ManticoreEVM()\r\nwith open('overflow.sol') as f: source_code = f.read()\r\nuser_account = m.create_account(balance=1000)\r\ncontract_account = m.solidity_create_contract(source_code,  owner=user_account)\r\nsymbolic_var1 = m.make_symbolic_value()\r\nsymbolic_var2 = m.make_symbolic_value()\r\ncontract_account.add(symbolic_var1, symbolic_var2)  # Uses one parameter, not two!\r\n```\r\n\r\n### Expected behavior\r\n\r\nSome sort of error in calling `add()` which takes only one parameter\r\n### Actual behavior\r\n\r\nNo error. \r\n\r\n### Any relevant logs\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/trailofbits/manticore/issues/comments/427920763","html_url":"https://github.com/trailofbits/manticore/issues/1178#issuecomment-427920763","issue_url":"https://api.github.com/repos/trailofbits/manticore/issues/1178","id":427920763,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzkyMDc2Mw==","user":{"login":"mossberg","id":2467355,"node_id":"MDQ6VXNlcjI0NjczNTU=","avatar_url":"https://avatars1.githubusercontent.com/u/2467355?v=4","gravatar_id":"","url":"https://api.github.com/users/mossberg","html_url":"https://github.com/mossberg","followers_url":"https://api.github.com/users/mossberg/followers","following_url":"https://api.github.com/users/mossberg/following{/other_user}","gists_url":"https://api.github.com/users/mossberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mossberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mossberg/subscriptions","organizations_url":"https://api.github.com/users/mossberg/orgs","repos_url":"https://api.github.com/users/mossberg/repos","events_url":"https://api.github.com/users/mossberg/events{/privacy}","received_events_url":"https://api.github.com/users/mossberg/received_events","type":"User","site_admin":false},"created_at":"2018-10-08T17:42:43Z","updated_at":"2018-10-08T17:42:43Z","author_association":"CONTRIBUTOR","body":"thanks rocky :) pr 1181 should address this; it causes a warning to be logged if this situation happens\r\n\r\n```\r\n[I] (py3) vagrant ubuntu-bionic /v/m/1178 ❯ py x.py\r\n2018-10-08 17:42:25,937: [5544] m.e.abi:WARNING: Number of provided arguments (2) does not match number of arguments in signature: add(uint256)\r\n\r\n```"}}
{"actor":{"display_login":"mossberg"}}