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

arbitraryCall() Unable to Guarantee Incentives Tokens Not Change #81

Closed
code423n4 opened this issue Dec 3, 2021 · 2 comments
Closed
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Handle

Meta0xNull

Vulnerability details

Impact

     *  This is a potentially dangerous function so to ensure trustlessness, *all* balances
     *  that may matter are guaranteed to not change.

There are Pre and Post Token Check for Deposit Token and Reward Token. But there is no check for Incentives Tokens which mean the number of Incentive Tokens May Go Lower after the arbitrary Call.

Proof of Concept

https://github.com/code-423n4/2021-11-streaming/blob/main/Streaming/src/Locke.sol#L728-L749

Tools Used

Manual Review

Recommended Mitigation Steps

    // external incentives to stream creator
    mapping (address => uint112) public incentives;

The Incentive Token Address and Amounts was stored in incentives. Thus, Just need to do a loop to compare Amounts in incentives Vs Token Balance in Contract Address at The End of arbitraryCall().

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Dec 3, 2021
code423n4 added a commit that referenced this issue Dec 3, 2021
@brockelmore brockelmore added sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue and removed sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue labels Dec 3, 2021
@brockelmore
Copy link
Collaborator

This one doesnt provide the exploit mechanism like in #107 so I am inclined to not have this be part of that because this isn't actually a helpful issue for identifying or fixing the real issue.

@0xean
Copy link
Collaborator

0xean commented Jan 16, 2022

dupe of #199

@0xean 0xean added 3 (High Risk) Assets can be stolen/lost/compromised directly duplicate This issue or pull request already exists and removed 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments labels Jan 16, 2022
@0xean 0xean closed this as completed Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants