Wrong implementation of accesss control for KatanaGovernance._authorized() #22
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
primary issue
Highest quality submission among a set of duplicates
🤖_primary
AI based primary recommendation
🤖_18_group
AI based duplicate group recommendation
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
sufficient quality report
This report is of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
/root/katana-operation-contracts/src/governance/KatanaGovernance.sol#L377-L383
Vulnerability details
Proof of Concept
The following implementation of _isAuthorized is wrong since an account is considered authorized if
block.timestamp > expiry
even if$.allowed[account] = false
. Meanwhile, even after the authorization expires, if$.allowed[account]
is true, then it is still authorized.Recommended Mitigation Steps
The correct way is to check both expiration time and
$.allowed[account]
with a conjunction.Assessed type
Access Control
The text was updated successfully, but these errors were encountered: