Closed c4-bot-4 closed 7 months ago
https://github.com/code-423n4/2024-03-abracadabra-money/blob/main/src/blast/BlastOnboardingBoot.sol#L129
Detailed description of the impact of this finding.
Initialization Checks: Ensure initialize can't be called more than once.
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
@> function initialize(Router _router) external onlyOwner { router = Router(payable(_router)); factory = IFactory(router.factory()); emit LogInitialized(_router); }
use a variable initializer so that it can be initialized once. bool initializer;
function initialize(Router _router) external onlyOwner { if(initializer){ revert(); } router = Router(payable(_router)); factory = IFactory(router.factory()); initializer=true; emit LogInitialized(_router); }
Context
no factor
141345 marked the issue as sufficient quality report
QA is more appropriate
0xCalibur (sponsor) disputed
thereksfour changed the severity to QA (Quality Assurance)
Lines of code
https://github.com/code-423n4/2024-03-abracadabra-money/blob/main/src/blast/BlastOnboardingBoot.sol#L129
Vulnerability details
Impact
Detailed description of the impact of this finding.
Initialization Checks: Ensure initialize can't be called more than once.
Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
@> function initialize(Router _router) external onlyOwner { router = Router(payable(_router)); factory = IFactory(router.factory()); emit LogInitialized(_router); }
Tools Used
Recommended Mitigation Steps
use a variable initializer so that it can be initialized once. bool initializer;
function initialize(Router _router) external onlyOwner { if(initializer){ revert(); } router = Router(payable(_router)); factory = IFactory(router.factory()); initializer=true; emit LogInitialized(_router); }
Assessed type
Context