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

Unchecked transfer #144

Closed
code423n4 opened this issue Nov 9, 2021 · 1 comment
Closed

Unchecked transfer #144

code423n4 opened this issue Nov 9, 2021 · 1 comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Handle

0v3rf10w

Vulnerability details

Impact

Unchecked transfer leading to free deposits to attacker account

Proof of Concept

function :: BasicSale._processWithdrawal(uint256,uint256,address) (tge/contracts/PublicSale.sol#212-229)

Several tokens do not revert in case of failure and return false. The return value of transfer mainToken.transfer(_member,v_value) (tge/contracts/PublicSale.sol#224) is not checked, and so if deposit will not revert if the transfer fails, and an attacker can call deposit for free.

Tools Used

Manual

Recommended Mitigation Steps

Return value needs to checked or use SafeREC20

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Nov 9, 2021
code423n4 added a commit that referenced this issue Nov 9, 2021
@chickenpie347 chickenpie347 added sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") duplicate This issue or pull request already exists and removed sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") labels Nov 16, 2021
@chickenpie347
Copy link
Collaborator

Addressed in #31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants