M-02 MitigationConfirmed #97
Labels
confirmed for report
This issue is confirmed for report
mitigation-confirmed
MR-M-02
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
Vulnerability details
C4 Issue
M-02: A malicious user can take on a loan using an existing borrower's collateral in refinanceFromLoanExecutionData()
Comments
Original vulnerabilities/impacts:
In refinanceFromLoanExecutionData(), no checks to ensure that
_loan.borrower == _loanExecutionData.borrower
. The attack vector is that a different borrower can receive loan principals using the existing loan borrower’s collateral.Mitigation
Fix: https://github.com/pixeldaogg/florida-contracts/pull/359/files
The mitigation is (1) use the existing loan borrower (_loan.borrower) as the borrower for the new loan and (2) _validateExecutionData() is re-written to check executionData’s signature against the passed borrower (loan.borrower). This ensures that if msg.sender is not the existing loan borrower,
checkSignature()
will correctly ensure that loanExecutionData is signed by the existing loan borrower (_loan.borrower).The attack vector of a different borrower taking out a new loan from the existing loan borrower is eliminated. Only the existing loan borrower will take on the new loan. The issue is resolved.
Test
The revised test is passing
Conclusion
LGTM
The text was updated successfully, but these errors were encountered: