Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Latest commit

 

History

History
23 lines (15 loc) · 813 Bytes

076.md

File metadata and controls

23 lines (15 loc) · 813 Bytes

Kodyvim

high

Reentrancyguard would not work as intended

Summary

Using openzepplin reentrancyguard for contracts deployed behind a proxy won't work.

Vulnerability Detail

reentrancyGuardfrom openzepplin has the _status set in the constructor, the nonReentrant modifier would not work as expect since _status variable is not reachable from the proxy.

Impact

Leaving contract vulnerable to reentrancy attacks.

Code Snippet

https://github.com/sherlock-audit/2023-05-ironbank/blob/main/ib-v2/src/protocol/pool/IronBank.sol#L5

Tool used

Manual Review

Recommendation

Use ReentrancyGuardUpgradeable and call __ReentrancyGuard_init() within the initialize function