If the executionData.duration time is not limited, it can lead to far exceeding the borrowing time offer.duration.
If the lender is a LoanManager, when repayLoan() it can also exceed the maximum pendingQueues, leading to accounting issues
Impact
far exceeding the borrowing time than offer.duration.
If lender is LoanManager also exceeds max pendingQueues, causing bookkeeping issues
Lines of code
https://github.com/code-423n4/2024-04-gondi/blob/b9863d73c08fcdd2337dc80a8b5e0917e18b036c/src/lib/loans/MultiSourceLoan.sol#L124
Vulnerability details
Vulnerability details
when
emitLoan()
, only limitoffer.duration != 0
,There's no limitexecutionData.duration<=offer.duration
emitLoan()
->_processOffersFromExecutionData()
->_validateOfferExecution()
If the
executionData.duration
time is not limited, it can lead to far exceeding the borrowing timeoffer.duration
. If thelender
is aLoanManager
, whenrepayLoan()
it can also exceed the maximumpendingQueues
, leading to accounting issuesImpact
far exceeding the borrowing time than
offer.duration
. Iflender
isLoanManager
also exceeds maxpendingQueues
, causing bookkeeping issuesRecommended Mitigation
check
executionData.duration<=offer[n].duration
Assessed type
Context