-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing isHooked
check when calling onQueueWithdrawal
hook function
#22
Comments
The poking of a lender's account is not permissioned; anyone could do it through the transfer function. The only reason the other functions have the |
3docSec changed the severity to QA (Quality Assurance) |
3docSec marked the issue as grade-b |
This previously downgraded issue has been upgraded by 3docSec |
See #83 (comment) on why this group has been marked as M. This particular dupe however lacks any elaboration on how a legitimately "missing check" translates to "improper reverts could happen". |
3docSec marked the issue as unsatisfactory: |
Lines of code
https://github.com/code-423n4/2024-08-wildcat/blob/main/src/access/AccessControlHooks.sol#L812
https://github.com/code-423n4/2024-08-wildcat/blob/main/src/access/FixedTermLoanHooks.sol#L848
Vulnerability details
Impact
Due to missing check of
isHooked
value inonQueueWithdrawal
function, improper reverts could happen with withdrawal operations.Proof of Concept
Hooks are utilized to oversee and intervene in market activities such as deposits, transfers, and withdrawals. Each hook instance maintains a state variable named
isHooked
for every market, ensuring it is properly registered and authorized to interact with market operations. This is clearly demonstrated in the implementation of theonDeposit
andonTransfer
hook functions.However, the
onQueueWithdrawal
function lacks this check, potentially leading to mishandling of hook actions by an unauthorized hook instance. BothAccessControlHooks
andFixedTermLoanHooks
contracts have this issue.Tools Used
Manual Review
Recommended Mitigation Steps
Add the check in the
onQueueWithdrawal
function:Assessed type
Invalid Validation
The text was updated successfully, but these errors were encountered: