Open hats-bug-reporter[bot] opened 1 month ago
Github username: -- Twitter username: -- Submission hash (on-chain): 0xfe25a0c906257e4d19f35ede55b581b83d2a1dab4db90ac651fdcffa0cae5626 Severity: low
Description:
The governor contract has the authority (team or community multisig) to upgrade an InverterBeacon_v1 via upgradeTo() call. There is a check to see if the new minor version is greater than the previous one the modifier validNewMinorVersion().
InverterBeacon_v1
upgradeTo()
validNewMinorVersion()
modifier validNewMinorVersion(uint newMinorVersion) { if (newMinorVersion <= minorVersion) { revert InverterBeacon__InvalidImplementationMinorVersion(); } _; }
However the new minor version can be set to uint256.max which will block any potential new update of the beacon contract.
uint256.max
Consider restricting the validNewMinorVersion() modifier to accept only +1 for the new version or below an acceptable limit.
if (newMinorVersion != minorVersion + 1) { revert(); }
OOS imo
thanks @PlamenTSV
Github username: -- Twitter username: -- Submission hash (on-chain): 0xfe25a0c906257e4d19f35ede55b581b83d2a1dab4db90ac651fdcffa0cae5626 Severity: low
Description:
Description
The governor contract has the authority (team or community multisig) to upgrade an
InverterBeacon_v1
viaupgradeTo()
call. There is a check to see if the new minor version is greater than the previous one the modifiervalidNewMinorVersion()
.However the new minor version can be set to
uint256.max
which will block any potential new update of the beacon contract.Recommendation
Consider restricting the
validNewMinorVersion()
modifier to accept only +1 for the new version or below an acceptable limit.