When a term is offboarded but not cleaned up and then it is onboarded again, an attacker can offboard it freely. #942
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-1147
satisfactory
satisfies C4 submission criteria; eligible for awards
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/main/src/governance/LendingTermOffboarding.sol#L89
Vulnerability details
Impact
When a term is offboarded but not cleaned up and then it is onboarded again, any user who don't have any weight can propose and offboard it freely without passing supporting process.
Proof of Concept
We say that a term is offboarded.
Then
canOffboard[term] == true
.Because of some reasons, for example issuance not repayed, it remains not cleaned up and then it can be onboarded again.
At this time, any user can propose it in offboarding. Then
polls[block.number][term]
is smaller than quorum butcanOffboard[term] == true
.So any user can offboard it immediately.
Tools Used
Manual Review
Recommended Mitigation Steps
LendingTermOffboarding.sol#proposeOffboard
function has to be modified as follows.Assessed type
Error
The text was updated successfully, but these errors were encountered: