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

Require for setting an address of pool contract #416

Closed
code423n4 opened this issue Dec 9, 2022 · 4 comments
Closed

Require for setting an address of pool contract #416

code423n4 opened this issue Dec 9, 2022 · 4 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 duplicate-437 unsatisfactory does not satisfy C4 submission criteria; not eligible for awards

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-11-paraspace/blob/main/paraspace-core/contracts/protocol/configuration/PoolAddressesProvider.sol#L75

Vulnerability details

Id parameter must not equal to the POOL constant. This prevents an attacker from overwriting the address of the pool contract, which could cause significant problems for the protocol.

Proof of Concept

Attacker calls setAddress and changes the address of the pool contract.
Now attacker owns the pool.

Recommended Mitigation Steps

Add require statement to setAdress() function similar to setAddressAsProxy():

require(id != POOL, Errors.INVALID_ADDRESSES_PROVIDER_ID);

@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 Dec 9, 2022
code423n4 added a commit that referenced this issue Dec 9, 2022
@c4-judge
Copy link
Contributor

dmvt marked the issue as duplicate of #54

@c4-judge
Copy link
Contributor

dmvt marked the issue as unsatisfactory:
Insufficient quality

@c4-judge c4-judge added unsatisfactory does not satisfy C4 submission criteria; not eligible for awards satisfactory satisfies C4 submission criteria; eligible for awards and removed unsatisfactory does not satisfy C4 submission criteria; not eligible for awards labels Jan 23, 2023
@c4-judge
Copy link
Contributor

dmvt marked the issue as satisfactory

@c4-judge
Copy link
Contributor

dmvt marked the issue as unsatisfactory:
Insufficient quality

@c4-judge c4-judge added unsatisfactory does not satisfy C4 submission criteria; not eligible for awards and removed satisfactory satisfies C4 submission criteria; eligible for awards labels Jan 23, 2023
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 duplicate-437 unsatisfactory does not satisfy C4 submission criteria; not eligible for awards
Projects
None yet
Development

No branches or pull requests

3 participants