VetoProposal: proposals cannot be vetoed in all states in which it should be possible to veto proposals #3
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
edited-by-warden
M-12
primary issue
Highest quality submission among a set of duplicates
selected for report
This submission will be included/highlighted in the audit report
Lines of code
https://github.com/code-423n4/2023-04-party/blob/440aafacb0f15d037594cebc85fd471729bcb6d9/contracts/proposals/VetoProposal.sol#L19-L60
Vulnerability details
Impact
The
VetoProposal
contract allows to veto proposals with thevoteToVeto
function.The proposal can only be vetoed when it is in the
Voting
state, otherwise thevoteToVeto
function reverts.The issue is that the
Voting
state is not the only state in which it should be possible to veto the proposal. It should also be possible to veto the proposal in thePassed
andReady
states.(We can see this by looking at the downstream
PartyGovernance.veto
function)It has been confirmed to me by the sponsor that the
voteToVeto
function should not restrict the situations in which vetos can occur.The impact of this issue is that the situations in which vetos can occur is more limited than it should be. Users should have the ability to veto proposals even in the
Passed
andReady
states but they don't.Proof of Concept
By looking at the
VetoProposal.voteToVeto
function we see that it's only possible to call the function when the proposal is in theVoting
state. Otherwise the function reverts:Link
But when we look at the
PartyGovernance.veto
function which is called downstream and which implements the actual veto functionality (theVetoProposal.voteToVeto
function is only a wrapper) we can see that it allows vetoing in theVoting
,Passed
andReady
states:Link
Therefore we can see that the
VetoProposal.voteToVeto
function restricts the vetoing functionality too much.Users are not able to veto in the
Passed
andReady
states even though it should be possible.Tools Used
VSCode
Recommended Mitigation Steps
The issue can be fixed by allowing the
VetoProposal.voteToVeto
function to be called in thePassed
andReady
states as well.Fix:
The text was updated successfully, but these errors were encountered: