code-423n4 / 2023-07-pooltogether-findings

12 stars 7 forks source link

Liquidator can liquidate the max amout of _liquidableYield for as low as 1 wei of PrizeTokens #232

Closed code423n4 closed 1 year ago

code423n4 commented 1 year ago

Lines of code

https://github.com/GenerationSoftware/pt-v5-vault/blob/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L665-L683 https://github.com/GenerationSoftware/pt-v5-vault/blob/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L550-L570

Vulnerability details

Impact

Proof of Concept

Tools Used

Manual Audit

Recommended Mitigation Steps

Assessed type

Other

c4-judge commented 1 year ago

Picodes marked the issue as duplicate of #376

c4-judge commented 1 year ago

Picodes marked the issue as unsatisfactory: Out of scope

stalinMacias commented 1 year ago

Hey @Picodes As per the sponsor's comment about this issue, what I'm reporting is not the fact that the LiquidationPair contract is a trusted free bugs contract, what I'm reporting is the fact that it is possible to set the address of the LiquidationPair as any arbitrary contract, from which it can be liquidated the yield for as low as 1 wei, is just a matter of directly calling the Vault::liquidate() function from the fake LiquidationPair

And what I'm suggesting indeed matches the sponsor's comment about assuming that the LiquidationPair is a trusted contract, because when setting a new LiquidationPair it won't be possible to pass any arbitrary address, but instead, the same contract will create a new LiquidationPair using the expected code for the LiquidationPairs.

Picodes commented 1 year ago

@stalinMacias fair point. I'll flag this issue as a duplicate of #300 which gathers all issues about malicious owner behaviors.

c4-judge commented 1 year ago

Picodes marked the issue as not a duplicate

c4-judge commented 1 year ago

Picodes marked the issue as duplicate of #300

c4-judge commented 1 year ago

Picodes marked the issue as satisfactory

c4-judge commented 1 year ago

Picodes changed the severity to 2 (Med Risk)