You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
github-actionsbot opened this issue
Jan 27, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
ClearingHouse.clear enforces a maxDuration for loan requests. In practice, the loan owner can easily bypass this limit by calling Cooler.roll as many times as needed.
Vulnerability Detail
The loan request can be made with a duration less than the maxDuration. ClearingHouse.clear calls Cooler.clear which sets true for Loan.rollable. The owner thus is now able to extend the loan term as much as he wants.
Impact
Loan owners are able to bypass the maxDuration restriction in ClearingHouse.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
enckrish
medium
ClearingHouse.maxDuration
can be easily bypassedSummary
ClearingHouse.clear
enforces amaxDuration
for loan requests. In practice, the loan owner can easily bypass this limit by callingCooler.roll
as many times as needed.Vulnerability Detail
The loan request can be made with a duration less than the
maxDuration
.ClearingHouse.clear
callsCooler.clear
which setstrue
forLoan.rollable
. The owner thus is now able to extend the loan term as much as he wants.Impact
Loan owners are able to bypass the
maxDuration
restriction inClearingHouse
.Code Snippet
https://github.com/sherlock-audit/2023-01-cooler/blob/main/src/aux/ClearingHouse.sol#L58-L86
Tool used
Manual Review
Recommendation
In
ClearingHouse.clear
, callCooler.toggleRoll
just after theCooler.clear
call.Duplicate of #215
The text was updated successfully, but these errors were encountered: