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

Disabled multisig can perform Minipool operations #538

Closed
code423n4 opened this issue Jan 3, 2023 · 5 comments
Closed

Disabled multisig can perform Minipool operations #538

code423n4 opened this issue Jan 3, 2023 · 5 comments
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 downgraded by judge Judge downgraded the risk level of this issue duplicate-702 partial-50 Incomplete articulation of vulnerability; eligible for partial credit only (50%)

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-12-gogopool/blob/main/contracts/contract/Ocyticus.sol#L55
https://github.com/code-423n4/2022-12-gogopool/blob/main/contracts/contract/MinipoolManager.sol#L57

Vulnerability details

Impact

In GoGoPool protocol, all multisigs can be disabled using the Ocyticus.pauseEverything and Ocyticus.disableAllMultisigs functions. It should also be noted that in MinipoolManager every Minipool gets assigned a mulstisig at the time of that Minipool creation.

After a multisig has been disabled it can still perform various operations on the Minipool for which it was assigned as a valid multisig. The operations includes:

  • claimAndInitiateStaking
  • recordStakingStart
  • recordStakingEnd
  • recreateMinipool (when not paused)
  • recordStakingError
  • cancelMinipoolByMultisig
  • finishFailedMinipoolByMultisig

The disabling of multisigs can be done for various reasons (including private key compromises) and letting disabled multisigs perform crucial operations on Minipools is not ideal.

Proof of Concept

Consider this scenario:

  • A multisig M1 was assigned to a Minipool.
  • Then Ocyticus.disableAllMultisigs was invoked and all multisigs were disabled.
  • Still the multisig M1 can invoke various functions for the Minipool (claimAndInitiateStaking, recordStakingEnd, recreateMinipool, recordStakingError, cancelMinipoolByMultisig, finishFailedMinipoolByMultisig) which can cause unintended loss of funds to the users or can result in ambiguous state for the protocol contracts.

Tools Used

Manual review

Recommended Mitigation Steps

The protocol should check the current enabled or disabled state of the caller multisigs before allowing it to perform any operation on the Minipool. The protocol should also have a way to upgrade the assigned multisig for a Minipool.

@code423n4 code423n4 added 3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working labels Jan 3, 2023
code423n4 added a commit that referenced this issue Jan 3, 2023
C4-Staff added a commit that referenced this issue Jan 6, 2023
@c4-judge
Copy link
Contributor

c4-judge commented Jan 8, 2023

GalloDaSballo marked the issue as duplicate of #618

@c4-judge
Copy link
Contributor

c4-judge commented Feb 1, 2023

GalloDaSballo marked the issue as duplicate of #702

@GalloDaSballo
Copy link

See #618

@c4-judge c4-judge added the partial-50 Incomplete articulation of vulnerability; eligible for partial credit only (50%) label Feb 2, 2023
@c4-judge
Copy link
Contributor

c4-judge commented Feb 2, 2023

GalloDaSballo marked the issue as partial-50

@c4-judge c4-judge added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value downgraded by judge Judge downgraded the risk level of this issue and removed 3 (High Risk) Assets can be stolen/lost/compromised directly labels Feb 8, 2023
@c4-judge
Copy link
Contributor

c4-judge commented Feb 8, 2023

GalloDaSballo changed the severity to 2 (Med Risk)

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 downgraded by judge Judge downgraded the risk level of this issue duplicate-702 partial-50 Incomplete articulation of vulnerability; eligible for partial credit only (50%)
Projects
None yet
Development

No branches or pull requests

3 participants