TRSRY:getLoan() is permissioned, but no policy has permission to call it #389
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Lines of code
https://github.com/code-423n4/2022-08-olympus/blob/b5e139d732eb4c07102f149fb9426d356af617aa/src/modules/TRSRY.sol#L92
Vulnerability details
Impact
The
getLoan()
function in theTRSRY.sol
contract is a way for users to withdraw approved loans from the protocol, which can be repaid withrepayLoan()
.No policies have permission to call this function, and it appears it was intended to be publicly callable, but it has the
permissioned
modifier, so it is functionally useless.Without the
getLoan()
function,repayLoan()
is functionally useless as well.Proof of Concept
Checking the permissions set in each of the policies, there is no policy that has permission to call
getLoan()
.The
permissioned
modifier requires that the function is only called by policies that have been pre-approved.As a result, this function cannot be called under any circumstances.
Tools Used
VS Code
Recommended Mitigation Steps
Remove the
permissioned
modifier from thegetLoan()
function.The text was updated successfully, but these errors were encountered: