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

Approval must be set to zero and after that increased to the amount you need. #5

Closed
code423n4 opened this issue May 13, 2022 · 2 comments
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-sturdy/blob/main/smart-contracts/ConvexCurveLPVault.sol#L141
https://github.com/code-423n4/2022-05-sturdy/blob/main/smart-contracts/ConvexCurveLPVault.sol#L146
https://github.com/code-423n4/2022-05-sturdy/blob/main/smart-contracts/LidoVault.sol#L102
https://github.com/code-423n4/2022-05-sturdy/blob/main/smart-contracts/YieldManager.sol#L221

Vulnerability details

Impact

Approval must be set to zero and after that increased to the amount you need.
Some of the tokens such as USDT require that.

Proof of Concept

Please read more information here: https://www.adrianhetman.com/unboxing-erc20-approve-issues/

Tools Used

Recommended Mitigation Steps


@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 13, 2022
code423n4 added a commit that referenced this issue May 13, 2022
@sforman2000
Copy link
Collaborator

Duplicate of #112

@sforman2000 sforman2000 marked this as a duplicate of #112 May 18, 2022
@itsmetechjay itsmetechjay added the duplicate This issue or pull request already exists label May 18, 2022
@HickupHH3
Copy link
Collaborator

Grouping this with the warden’s QA report: #2

@HickupHH3 HickupHH3 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 Jun 3, 2022
@HickupHH3 HickupHH3 mentioned this issue Jun 6, 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

4 participants