_baseLoanChecks() check errors for expire #26
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
H-15
primary issue
Highest quality submission among a set of duplicates
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2024-04-gondi/blob/b9863d73c08fcdd2337dc80a8b5e0917e18b036c/src/lib/loans/MultiSourceLoan.sol#L649
Vulnerability details
Vulnerability details
_baseLoanChecks()
is used to check whether Loan has expired.The expiration checks in liquidation are as follows:
This way, both checks pass when
block.timestamp == _loan.startTime + _loan.duration
This leads to the problem that a malicious attacker can perform the following step
when
block.timestamp == _loan.startTime + _loan.duration
loanLiquidated(loandId = 1)
will fail , because_loans[1]
has been clearedImpact
Maliciously disrupting the end of the bidding, causing the NFT/funds to be locked
Recommended Mitigation
Assessed type
Context
The text was updated successfully, but these errors were encountered: