Closed code423n4 closed 3 years ago
jvaqa
isStakePenalizer() function does not use the roleCache, but all of the other nearly identical role getter functions do use it.
isStakePenalizer() uses: 'return roles.getRole(STAKE_PENALIZER, contr);'
whereas all of the other getter functions resemble:
'return roleCache[contr][TOKEN_ACTIVATOR];
Change this: return roles.getRole(STAKE_PENALIZER, contr); to this: return roleCache[contr][STAKE_PENALIZER];
Duplicate of #12
Handle
jvaqa
Vulnerability details
Impact
isStakePenalizer() function does not use the roleCache, but all of the other nearly identical role getter functions do use it.
Proof of Concept
isStakePenalizer() uses: 'return roles.getRole(STAKE_PENALIZER, contr);'
whereas all of the other getter functions resemble:
'return roleCache[contr][TOKEN_ACTIVATOR];
Recommended Mitigation Steps
Change this: return roles.getRole(STAKE_PENALIZER, contr); to this: return roleCache[contr][STAKE_PENALIZER];