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

Re-entrancy Guard Is Not Initialized #13

Closed
code423n4 opened this issue Mar 17, 2022 · 3 comments
Closed

Re-entrancy Guard Is Not Initialized #13

code423n4 opened this issue Mar 17, 2022 · 3 comments
Labels
bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) 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-03-prepo/blob/main/contracts/core/PrePOMarketFactory.sol#L15

Vulnerability details

Impact

During the manual code review, It has been observed that re-entrancy guard (ReentrancyGuardUpgradeable) contract is not initialized. The contract should be initialized in the initialize function.

Proof of Concept

  1. Navigate to the following contract.

https://github.com/code-423n4/2022-03-prepo/blob/main/contracts/core/PrePOMarketFactory.sol#L15

Tools Used

Code Review

Recommended Mitigation Steps

Consider initializing function in the related section.

    function initialize() public initializer {
        OwnableUpgradeable.__Ownable_init();
        __ReentrancyGuard_init();
    }

@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 Mar 17, 2022
code423n4 added a commit that referenced this issue Mar 17, 2022
@ramenforbreakfast
Copy link
Collaborator

Valid claim, however I dispute the severity to low-risk since nonReentrant should still work as intended even if its entrance variable is not initialized.

@ramenforbreakfast ramenforbreakfast added the disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) label Mar 22, 2022
@ramenforbreakfast
Copy link
Collaborator

I consider #106 to be a higher quality submission regarding this issue.

@gzeoneth
Copy link
Member

gzeoneth commented Apr 3, 2022

Agree with sponsor, downgrading to Low/QA. Closing in favor of warden's QA report #113

@gzeoneth gzeoneth closed this as completed Apr 3, 2022
@gzeoneth gzeoneth added QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax duplicate This issue or pull request already exists and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Apr 3, 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 disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) 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

3 participants