Closed howlbot-integration[bot] closed 1 month ago
Not a concern. A borrower may desire the ability to remove themselves as a role provider in the event that compliance/legal guidance directs that their access credentials should all be granted through - for example - role providers with an on-chain KYC trail.
The borrower renounces a privilege they may need later. Looks a pretty clear user error
3docSec marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2024-08-wildcat/blob/main/src/access/AccessControlHooks.sol#L249-L259 https://github.com/code-423n4/2024-08-wildcat/blob/main/src/access/FixedTermLoanHooks.sol#L286-L296
Vulnerability details
Impact
Once the borrower is removed from the role providers, it cannot be added again, resulting in the borrower having no way to directly grant roles.
Proof of Concept
When a hook instance of
AccessControlHooks
orFixedTermLoanHooks
is deployed, the deployer(borrower) itself will be added as the default role provider:The borrower of the hook instance can add new role provider or remove existing role provider as their wish. However, when the borrower itself is removed from the role providers, it cannot be added back, as the borrower is unlikely to be a valid
IRoleProvider
address, and the callIRoleProvider#isPullProvider()
will always revert:Copy below codes to AccessControlHooks.t.sol and run forge test --match-test test_addBorrowerAsRoleProvider:
Tools Used
Manual review
Recommended Mitigation Steps
borrower
should never be removed from role providers:Assessed type
Access Control