Closed c4-bot-9 closed 8 months ago
Picodes marked the issue as duplicate of #620
Picodes changed the severity to 2 (Med Risk)
Picodes changed the severity to QA (Quality Assurance)
This previously downgraded issue has been upgraded by Picodes
Picodes marked the issue as not a duplicate
Picodes marked the issue as duplicate of #620
Picodes marked the issue as satisfactory
Lines of code
https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfacb662cdea6417c52f23c94d5b5b/src/arbitrage/tests/ArbitrageGas.t.sol#L4
Vulnerability details
Description
To change the Website URL or a contract address, the DAO has to create two proposals.
The first proposal can be created by any SALT holder. Note how the ballotName is created.
When the first proposal passes and is executed the DAO contract creates a confirmation proposal. Note that it concatenates the current ballot name with "_confirm" string to create the confirmation proposal.
When the confirmation proposal passes, the original change proposed by the first proposal can be made.
When any proposal is created, there must not be a pending proposal with the same name.
The set contract and website url ballot names are created with
string.concat("setContract:", contractName )
andstring.concat("setURL:", newWebsiteURL )
respectively.The ballot names for the confirmation proposals are created by concatenating "_confirm" with the original ballot name,
string.concat(ballot.ballotName, "_confirm")
.The DAO cannot create a confirmation proposal if a proposal with the same name already exists. This will keep the original proposal stuck.
Any staker who is against the original proposal can keep it stuck by taking the ballotName of the original proposal, concatenating it with "_confirm" and creating a new proposal.
This creates a proposal with the same name as the future confirmation proposal and keeps the original proposal stuck.
If the DAO decides to vote against the rogue staker to remove his proposal, he can backrun the execution of the bad proposal with another proposal with the same ballotName as the bad proposal.
This allows a rogue staker to stop changes he doesn't like or even an attacker to permanently DOS website URL or smart contract changes.
Impact
Any staker against a website URL or contract change can stop it. An attacker can permanently DOS websiteURL changes o
Proof of Concept
The test can be run in DAO.t.sol.
Tools Used
Manual Analysis
Recommended Mitigation Steps
Check if original proposal ballot names end with "_confirm" string before creating them.
Assessed type
Governance