Malicious users can block admins from accessing setter functions
The executeSetterFunction() in multiSign.sol lacks access control, allowing any user to call it and reset admin approvals. This blocks admins from calling certain setter functions, causing a denial of service.
Source: https://github.com/sherlock-audit/2024-11-autonomint-judging/issues/640
Found by
0x37, 0xAristos, 0xTamayo, 0xundiscover, BitcoinEason, Boraicho, DenTonylifer, Galturok, John44, Ragnarok, chista0x, durov, onthehunt, pashap9990, santiellena, t.aksoy, theweb3mechanic, tjonair, volodya
Summary
executeSetterFunction() in multiSign.sol lacks access control so malicious users can prevent admins from accessing setters.
Root Cause
Some admin setters in borrowing.sol and CDS.sol require a call to multiSign.sol::executeSetterFunction(). If checks in executeSetterFunction() pass admins' approvals for the setters are reset. However, executeSetterFunction() can be called by anyone, so malicious users can call this function first and reset the admins' approvals which will block admins from calling the setters.
function executeSetterFunction(
SetterFunctions _function
) external returns (bool) {
// Get the number of approvals
require(getSetterFunctionApproval(_function) >= requiredApprovals,"Required approvals not met");
// Loop through the approved functions with owners mapping and change to false
for (uint64 i; i < noOfOwners; i++) {
approvedToUpdate[_function][owners[i]] = false;
}
return true;
}
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
- Malicious user notices that an approval threshold for a certain setter was met
- Malicious user calls executeSetterFunction() on multiSign.sol which resets the approvals
- Admins get blocked from calling the setter
Impact
5 admin setters in both borrowing.sol and CDS.sol require executeSetterFunction() call so all of them can be DOS'ed by malicious users. Some of setters like setAPR(), setLTV(), setBondRatio() in borrowing.sol can negatively impact user experience if DOS'ed.
PoC
No response
Mitigation
Implement access control to executeSetterFunction().
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the executeSetterFunction() function lacks an access control modifier, allowing any caller to reset approvals.
Impact
Five admin setters in borrowing.sol and CDS.sol can be blocked, causing a denial of service that may negatively impact user experience.
What the attacker needed
Approval threshold met for a setter
The fix
Implement access control to executeSetterFunction().
How it was found
- Malicious user notices that an approval threshold for a certain setter was met
- Malicious user calls executeSetterFunction() on multiSign.sol which resets the approvals
- Admins get blocked from calling the setter
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In a smart contract, some functions are meant to be called only by admins. Here, a function that resets approvals can be called by anyone, so an attacker can call it first and wipe out the approvals that admins need to make changes. This stops the admins from doing their job.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.