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

CollSurplusPool doesn't verify that the passed _whitelistAddress is an actual contract addres #230

Open
code423n4 opened this issue Dec 22, 2021 · 2 comments
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")

Comments

@code423n4
Copy link
Contributor

Handle

Ruhum

Vulnerability details

Impact

All the other passed variables are checked. Only _whitelistAddress is ignored. This allows passing a zero function which would break the functionality.

Proof of Concept

https://github.com/code-423n4/2021-12-yetifinance/blob/main/packages/contracts/contracts/CollSurplusPool.sol#L51-L54

Tools Used

none

Recommended Mitigation Steps

add checkContract(_whitelistAddress)

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Dec 22, 2021
code423n4 added a commit that referenced this issue Dec 22, 2021
@kingyetifinance kingyetifinance added the sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") label Jan 5, 2022
@kingyetifinance
Copy link
Collaborator

@LilYeti: This is quite niche risk during deployment but is an issue nonetheless.

@0xtruco
Copy link
Collaborator

0xtruco commented Jan 11, 2022

resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Projects
None yet
Development

No branches or pull requests

3 participants