Aura admins can lock funds forever #178
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraLocker.sol#L195-L198
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/convex-platform/contracts/contracts/BaseRewardPool.sol#L125-L131
Vulnerability details
Impact
Aura admins can lock funds forever, essentially rugging their users
Proof of Concept
By adding a lot of reward tokens:
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraLocker.sol#L195-L198
And then transferring admin privs to another account and then throwing away that account's private key (so that recovery can't be started by calling
shutdown()
alter), an admin can cause user operations to revert whenever they attempt to get their funds:https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraLocker.sol#L170-L188
The modifier is used on this function, and all functions where the user can claim funds:
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraLocker.sol#L370-L376
I confirmed with the sponsor that the admin being able to steal user funds counts for the 100k bonus, and the above fulfills that requirement
The
BaseRewardsPool
has a similar issue:https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/convex-platform/contracts/contracts/BaseRewardPool.sol#L125-L131
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/convex-platform/contracts/contracts/BaseRewardPool.sol#L222-L232
Tools Used
Code inspection
Recommended Mitigation Steps
Allow the caller to provide an offset and a length, to allow the batch-claiming of rewards
The text was updated successfully, but these errors were encountered: