H-16 MitigationConfirmed #94
Labels
confirmed for report
This issue is confirmed for report
mitigation-confirmed
MR-H-16
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
Vulnerability details
C4 Issue
H-16: validateOffer() reentry to manipulate exchangeRate
Comments
Original vulnerabilities:
_validateOfferExecution()
will be called during loan initiation (emitLoan) for each offerExecution.For each validateOfferExecution() call, there could be multiple external callbacks. In the first call back (validateOfferExecution() → ILoanManager(lender).validateOffer()), the outstanding values in the pool are modified but tokens are not transferred until after
_validateOfferExecution()
call.Original impacts:
This allows later callbacks in _validateOfferExecution() to take advantage of the discrepancy in totalAssets() before/after the token transfer.
Mitigation
Fix: https://github.com/pixeldaogg/florida-contracts/pull/381/files
The original attack is carried out in _checkValidators() → IOfferValidator(thisValidator.validator).validateOffer(). The mitigation is to disable IOfferValidator(thisValidator.validator).validateOffer() to trigger any state changes by restricting the interface validateOffer() view only.
This restricts runtime calls to be view only, eliminating the attack vector and resolve the issue.
Conclusion
LGTM
The text was updated successfully, but these errors were encountered: