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

a overflow vulnerability in mintToken #1

Open
n0pn0pn0p opened this Issue Oct 26, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@n0pn0pn0p
Copy link

n0pn0pn0p commented Oct 26, 2018

hi, the mintToken function of SwftCoin seems to has an integer overflow that allows the owner of the contract to set the balance of an arbitrary user to any value.

function mintToken(address target, uint256 mintedAmount) onlyOwner {
balanceOf[target] += mintedAmount;
totalSupply += mintedAmount;
Transfer(0, this, mintedAmount);
Transfer(this, target, mintedAmount);
}

you can see the test of this vulnerability in https://github.com/n0pn0pn0p/smart_contract_-vulnerability/edit/master/PolyAi.md , plz verify, thx!

(yogurt.yang@dbappsecurity.com.cn)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment