Open code423n4 opened 3 years ago
A valid issue in reducing annoyance for DAO proposals. Suggested mitigation fixes the issue. Medium Severity.
The only attack vector here is DoS attack which could be fought by the community by pooling funds for flashbot TX that front runs the attacker. While inconvenient, it doesn't stop the protocol for long. Agree with sponsor about severity.
Handle
hickuphh3
Vulnerability details
Impact
In general, creating invalid proposals is easy due to the lack of validation in the
new*Proposal()
functions.typeStr
is not validated at all. For example, one can callnewActionProposal()
withtypeStr = ROUTER
ortypeStr = BAD_STRING
, both of which will pass. The first will causefinaliseProposal()
to fail because the proposed address is null, preventingcompleteProposal()
from executing. The second does nothing because it does not equate to any of the checktypeStr
, and socompleteProposal()
isn't executed at all.finaliseProposal()
when the relevant sub-functions are called, like themove*()
functions.All of these scenarios lead to a mandatory 15 day wait since proposal creation in order to be cancelled, which prevents the creation of new proposals (in order words, denial of service of the DAO).
Recommended Mitigation Steps
typeStr
submitted. Specifically,newActionProposal()
should only allowFLIP_EMISSIONS
andGET_SPARTA
proposal typesnewAddressProposal()
should only allowDAO
,ROUTER
,UTILS
,RESERVE
,LIST_BOND
,DELIST_BOND
,ADD_CURATED_POOL
andREMOVE_CURATED_POOL
proposal typesnewParamProposal()
should only allowCOOL_OFF
andERAS_TO_EARN
proposal types_completeProposal()
infinaliseProposal()
newAddressProposal()
andnewParamProposal()