Breakglass (emergency) functions in UpdateWeightRunner use flawed if-else logic that causes admin calls to revert when both admin and manager permissions are enabled. Despite having the permission, the admin will be unable to execute these critical emergency functions because the code first checks for manager permissions and reverts if the caller isn't the manager, never reaching the admin permission check.
This issue occurs when both MASK_POOL_QUANTAMM_ADMIN_UPDATES and MASK_POOL_OWNER_UPDATES are enabled. It is reasonable expectation that admin can execute breakglass functions since his permission is enabled.
Let's look at InitialisePoolLastRunTime function implementation:
If both permissions are enabled:
The same issue is present also in setWeightsManually and setIntermediateValuesManually functions.
Admin cannot execute emergency function when both permissions are enabled
Could prevent emergency response in critical situations
High severity as it affects emergency functionality
Manual code review
Change the logic to use OR condition:
Design choice confirmed by the sponsor.
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.