GoGoPool contest - wallstreetvilkas's results

Liquid staking for Avalanche.

General Information

Platform: Code4rena

Start Date: 15/12/2022

Pot Size: $128,000 USDC

Total HM: 28

Participants: 111

Period: 19 days

Judge: GalloDaSballo

Total Solo HM: 1

Id: 194

League: ETH

GoGoPool

Findings Distribution

Researcher Performance

Rank: 108/111

Findings: 1

Award: $9.93

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

9.9345 USDC - $9.93

Labels

bug
3 (High Risk)
satisfactory
edited-by-warden
duplicate-213

External Links

Lines of code

https://github.com/code-423n4/2022-12-gogopool/blob/aec9928d8bdce8a5a4efe45f54c39d4fc7313731/contracts/contract/MinipoolManager.sol#L242-L246

Vulnerability details

Impact

Detailed description of the impact of this finding.

1.Any validator, while creating a pool can submit different validator's nodeId and change the pool's status to prelaunch. It can only change to prelaunch if the current pool's status is withdrawable. Now imagine if the attacker submits nodeId of the validator's pool which is withdrawable. He cannot withdraw, because while withdrawing, it reverts because it's not a valid pool state transition. 2. The pool's data gets reset, clearing out the previous pool data set by victim validator leading to a loss of validator funds.

Proof of Concept

Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.

https://github.com/code-423n4/2022-12-gogopool/blob/aec9928d8bdce8a5a4efe45f54c39d4fc7313731/contracts/contract/MinipoolManager.sol#L242-L246

The if statement checks if a pool for NodeId exists. It incorrectly assumes that the person calling the function uses their own NodeId. It then resets the pool associated with NodeId, which isn't the caller, but some innocent validator. All the attacker needs to do is to just call the function createMinipool() and set the NodeId to someone else's. That's it.

Tools Used

Manual review

Check if there's already an existing pool associated with specified NodeId, and then check if msg.sender is the actual owner of the pool or not.

#0 - 0xminty

2023-01-04T00:07:45Z

dupe of #805

#1 - c4-judge

2023-01-09T12:37:34Z

GalloDaSballo marked the issue as duplicate of #213

#2 - c4-judge

2023-02-03T12:33:01Z

GalloDaSballo changed the severity to 2 (Med Risk)

#3 - c4-judge

2023-02-03T19:26:10Z

GalloDaSballo changed the severity to 3 (High Risk)

#4 - c4-judge

2023-02-08T08:26:45Z

GalloDaSballo changed the severity to 2 (Med Risk)

#5 - c4-judge

2023-02-08T08:50:11Z

GalloDaSballo changed the severity to 3 (High Risk)

#6 - c4-judge

2023-02-08T20:29:05Z

GalloDaSballo marked the issue as satisfactory

#7 - c4-judge

2023-02-09T08:53:06Z

GalloDaSballo changed the severity to QA (Quality Assurance)

#8 - Simon-Busch

2023-02-09T12:53:15Z

Changed severity back from QA to H as requested by @GalloDaSballo

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter