Skip to content

Latest commit

 

History

History
39 lines (21 loc) · 1.12 KB

File metadata and controls

39 lines (21 loc) · 1.12 KB

Square Flint Grasshopper

Medium

Possible storage collision during upgrade

Summary

Such as ReputationMarket.sol it is recommend to use ReentrancyGuardUpgradeable instead of ReentrancyGuard and make __ReentrancyGuard_init() in initialize function. It is need such as ReentrancyGuard contract stores variable _status in the state, so id new version of the contract will be have another inheritance layout it may cause of the storage collision.

Root Cause

In ReputationMarket.sol:36 is inheritance from ReentrancyGuard instead of ReentrancyGuardUpgradeable

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

  1. Admin would like to upgrade contract
  2. New implementation have changed inheritance layout or new contracts added to inherit before ReentrancyGuard
  3. Storage collision

Impact

The protocol will be broken and it may be cause of loss some data from storage

PoC

No response

Mitigation

No response