Incorrect index usage in the InheritanceManager::nonReentrant
modifier renders the reentrancy protection ineffective, leaving functions that rely on this modifier vulnerable to reentrancy attacks.
The nonReentrant
modifier in the InheritanceManager
contract incorrectly checks transient storage slot 1 while setting the lock on slot 0:
The modifier is intended to prevent reentrancy by checking if a lock is set in transient storage and reverting if it is. However, it checks slot 1 (via tload(1)) while setting and clearing the lock on slot 0 (via tstore(0, 1) and tstore(0, 0)). This mismatch means the reentrancy check does not correspond to the slot being locked, rendering the guard ineffective
Any function that uses this modifier as a reentrancy guard is vulnerable to reentrancy attack
Manumal code review
Correct the modifier to check slot 0:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.