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

Wrong update of feeManager, poolManager, or voteDelegate (Booster.sol) can lock its functionality #361

Open
code423n4 opened this issue May 25, 2022 · 1 comment
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

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/convex-platform/contracts/contracts/Booster.sol#L139
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/convex-platform/contracts/contracts/Booster.sol#L149
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/convex-platform/contracts/contracts/Booster.sol#L192

Vulnerability details

By mistake, if wrong addresses of the above are set then the contracts functionality will be impacted. Or if address is set to a contract (poolManagerProxy for poolManager) which does not have means to set it again.

Impact

Currently, feeManager can only be set by a feeManager role using setFeeManager function. In case of any unwanted activity, say given wrong address or a null address, the operations accessible to feeManager could not be accessed anymore. Moreover, the feeManager can not be set anymore, since only feeManager can update it.
Same applies for poolManger(setPoolManager) and voteDelegate(setVoteDelegate).
The impact is, operations accessible for feeManager, poolManager or voteDelegate can not be accessed anymore.

Proof of Concept

function setFeeManager
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/convex-platform/contracts/contracts/Booster.sol#L139
function setPoolManager
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/convex-platform/contracts/contracts/Booster.sol#L149
function setVoteDelegate
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/convex-platform/contracts/contracts/Booster.sol#L192
deploySystem.ts
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/scripts/deploySystem.ts#L613

Tools Used

Manual review

Recommended Mitigation Steps

Additionally, add owner accessibility to each function on the given require statement.
For function setFeeManager,

require(msg.sender == feeManager || msg.sender==owner, "!auth");

For function setPoolManager,

require(msg.sender==poolManager || msg.sender==owner, "!auth");

For function setVoteDelegate,

require(msg.sender==voteDelegate || msg.sender==owner, "!auth");
@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 May 25, 2022
code423n4 added a commit that referenced this issue May 25, 2022
@0xMaharishi 0xMaharishi added the duplicate This issue or pull request already exists label May 28, 2022
@dmvt dmvt marked this as a duplicate of #31 Jun 23, 2022
@dmvt dmvt closed this as completed Jun 23, 2022
@dmvt dmvt added QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Jul 11, 2022
@dmvt dmvt marked this as not a duplicate of #31 Jul 11, 2022
@dmvt
Copy link
Collaborator

dmvt commented Jul 11, 2022

Per #364 (comment) I have decided to downgrade this to QA.

@dmvt dmvt reopened this Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants