Closed c4-submissions closed 1 year ago
minhquanym marked the issue as low quality report
Seems invalid. When his approval in account become AuthRole.Null, he can always call updateLenderAuthorization() to get AuthRole.WithdrawOnly
MarioPoneder marked the issue as unsatisfactory: Invalid
Hi, @laurenceday!
I just want to note you that this issue can arise after fixing of the #236. (restriction of updateLenderAuthorization()
function)
Lines of code
https://github.com/code-423n4/2023-10-wildcat/blob/c5df665f0bc2ca5df6f06938d66494b11e7bdada/src/market/WildcatMarketConfig.sol#L88-L102 https://github.com/code-423n4/2023-10-wildcat/blob/c5df665f0bc2ca5df6f06938d66494b11e7bdada/src/market/WildcatMarketBase.sol#L197-L213
Vulnerability details
Impact
Explanation
If a lender's address is flagged as sanctioned by the Chainanalysis oracle, there are two possible scenarios:
Proof of Concept
The problem arise that when the lender is sanctioned, he become with
approval = AuthRole.Blocked
, but when the lender is unsanctioned and return the lender to good grace within their market by callingstunningReversal()
, hisapproval in account become AuthRole.Null
. So, after lender is unsanctioned, he will not be able to withdraw and deposit again, because when:The lender try to deposit or withdraw...
... the
_getAccountWithRole()
function is invoked, which contains the following check:This check always will revert since
account.approval = AuthRole.Null
Tools Used
Mitigation Steps
Update the approval (AuthRole) of account properly in
stunningReversal()
functionAssessed type
Context