Proposals can be cancelled
The DAO contract's cancelProposal function allows anyone to cancel any proposal by passing the same ID for both old and new proposal parameters, bypassing the minority check. An attacker could repeatedly cancel proposals, causing a denial of service that prevents governance actions.
Vader Protocol contest
Originally disclosed on Code4rena
Anyone can cancel any proposals by calling DAO.cancelProposal(id, id) with oldProposalID == newProposalID. This always passes the minority check as the proposal was approved.
An attacker can launch a denial of service attack on the DAO governance and prevent any proposals from being executed.
Recommend checking that oldProposalID == newProposalID
strictly-scarce (vader) confirmed:
This is valid, can fix with a
require()
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 cancelProposal function does not verify that oldProposalID and newProposalID are different, allowing a caller to cancel a proposal by referencing it as both the old and new proposal.
Impact
An attacker could launch a denial of service attack on the DAO governance and prevent any proposals from being executed.
What the attacker needed
None
The fix
The fix should add a require statement to ensure oldProposalID and newProposalID are not equal.
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.
A smart contract is a program on a blockchain. This DAO contract lets people propose and vote on changes. The cancel function was supposed to let you cancel only your own new proposal if most voters disagreed with it. But because it didn't check that the two proposal IDs were different, anyone could cancel any proposal, even approved ones, and stop the DAO from working.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.