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

QA Report #4

Open
code423n4 opened this issue Apr 21, 2022 · 3 comments
Open

QA Report #4

code423n4 opened this issue Apr 21, 2022 · 3 comments
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax reviewed Issues that Backd has reviewed (just for internal tracking, can ignore this) sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-04-backd/blob/main/backd/contracts/AddressProvider.sol#L47

Vulnerability details

Impact

In AddressProvider.sol the use of Open Zeppelin upgradeable contracts indicates that AddressProvider.sol should be upgradeable. The problem is that it uses a constructor function which should not be used in upgradeable contracts since it can break upgradeability.

Proof of Concept

https://github.com/code-423n4/2022-04-backd/blob/main/backd/contracts/AddressProvider.sol#L47

Tools Used

Manual code review

Recommended Mitigation Steps

Consider deleting the constructor function and adding its logic inside the initialize() function.

@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 Apr 21, 2022
code423n4 added a commit that referenced this issue Apr 21, 2022
@code423n4 code423n4 mentioned this issue Apr 27, 2022
@chase-manning
Copy link
Collaborator

This contract is not upgradable.

@chase-manning chase-manning added sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue reviewed Issues that Backd has reviewed (just for internal tracking, can ignore this) labels Apr 29, 2022
@gzeoneth
Copy link
Member

gzeoneth commented May 7, 2022

Not sure why you need an initializer if it is not behind proxy. Downgrading to Low / QA regardless.

@gzeoneth gzeoneth closed this as completed May 7, 2022
@gzeoneth gzeoneth 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 May 7, 2022
@gzeoneth gzeoneth reopened this May 8, 2022
@JeeberC4
Copy link
Contributor

JeeberC4 commented May 9, 2022

Preserving original title as warden did not submit a QA Report and judge downgraded issue: Constructor function used in upgradeability contract

@JeeberC4 JeeberC4 changed the title Constructor function used in upgradeability contract QA Report May 9, 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 QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax reviewed Issues that Backd has reviewed (just for internal tracking, can ignore this) sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Projects
None yet
Development

No branches or pull requests

4 participants