Submitted by 0x52, also found by IllIllI, Diana, cryptostellar5, oyc_109, 0xSmartContract, SleepingBugs, adriro, Deivitto, V_B, betweenETHlines, peanuts, Koolex, and Rolezn
contracts/smart-contract-wallet/base/ModuleManager.sol#L18
SmartAccount.sol inherits from contracts that are not stateless and dont contain storage gaps which can be dangerous when upgrading.
When creating upgradable contracts that inherit from other contracts is important that there are storage gap in case storage variable are added to inherited contracts. If an inherited contract is a stateless contract (i.e. it doesnt have any storage) then it is acceptable to omit a storage gap, since these function similar to libraries and arent intended to add any storage. The issue is that SmartAccount.sol inherits from contracts that contain storage that dont contain any gaps such as ModuleManager.sol. These contracts can pose a significant risk when updating a contract because they can shift the storage slots of all inherited contracts.
Add storage gaps to all inherited contracts that contain storage variables.
livingrockrises (Biconomy) commented:
livingrockrises (Biconomy) acknowledged
livingrockrises (Biconomy) commented:
gzeon (judge) commented:
