Wrong implementation of accesss control for KatanaGovernance._authorized() #116
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
AI based primary recommendation
🤖_18_group
AI based duplicate group recommendation
sufficient quality report
This report is of sufficient quality
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: