Closed c4-bot-10 closed 7 months ago
0xA5DF marked the issue as primary issue
Sponsor: Please comment on the severity of the issue If issuing a new offer is a no brainer then this falls under this category - https://github.com/code-423n4/org/issues/143
It does fall within that category. Attacker would need to be emitting loans + repaying loans to constantly DoS.
0xA5DF changed the severity to QA (Quality Assurance)
Marking as low, open to hear arguments for med
0xA5DF marked the issue as grade-c
Moved to #74
Lines of code
https://github.com/code-423n4/2024-04-gondi/blob/b9863d73c08fcdd2337dc80a8b5e0917e18b036c/src/lib/loans/MultiSourceLoan.sol#L124
Vulnerability details
Vulnerability details
If
offer.capacity=0
, then thisoffer.offerId
becomes one-time.emitLoan()
->_processOffersFromExecutionData()
This gives a malicious attacker an opportunity to maliciously attack all
offers
withlender == Pool
. Example Bob callemitLoan(lender == Pool, offerId = 123)
emitLoan(lender == Pool, offerId = 123,capacity=0, duration=0)
repayLoan()
get back nftImpact
DOS all Pool's offer
Recommended Mitigation
If
lender
isLoanManager
, thenoffer.capacity
must not be 0.Assessed type
DoS