Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integer overflow in increaseApproval #1

Open
whiteHat001 opened this issue Jul 13, 2018 · 0 comments
Open

Integer overflow in increaseApproval #1

whiteHat001 opened this issue Jul 13, 2018 · 0 comments

Comments

@whiteHat001
Copy link

whiteHat001 commented Jul 13, 2018

Hello,I found an integer overflow in increaseApproval function.And it doesn't use the safe function to add value.
code addresss:
https://etherscan.io/address/0x30ceCB5461A449A90081F5a5F55db4e048397BAB
vuln code:

    function increaseApproval (address _spender, uint _addedValue) 
        returns (bool success) {
        //allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
        allowed[msg.sender][_spender] += _addedValue;   //integer overflow
        Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
      }

Before overflow
image
After add value 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
2b49db43-3d38-4c6c-a8ca-4c65d70cb01b

Discovered by zhihua.yao@dbappsecurity.com.cn

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

No branches or pull requests

1 participant