Closed code423n4 closed 1 year ago
The _isValidDescriptionForProposer is checking if the length of description to be longer than 52, or it returns true and make propose function revert.
returning true doesn't make the propose function revert, returning false does; invalid submission.
See the _isValidDescriptionForProposer natspec:
* If the proposal description ends with `#proposer=0x???`, where `0x???` is an address written as a hex string
* (case insensitive), then the submission of this proposal will only be authorized to said address.
...
* If the description does not match this pattern, it is unrestricted and anyone can submit it.
0xSorryNotSorry marked the issue as primary issue
DZGoldman marked the issue as sponsor disputed
0xean marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/ArbitrumFoundation/governance/blob/c18de53820c505fc459f766c1b224810eaeaabc5/src/security-council-mgmt/governors/SecurityCouncilMemberElectionGovernor.sol#L86 https://github.com/ArbitrumFoundation/governance/blob/c18de53820c505fc459f766c1b224810eaeaabc5/src/security-council-mgmt/governors/SecurityCouncilNomineeElectionGovernor.sol#L161
Vulnerability details
Impact
SecurityCouncilNomineeElectionGovernor::_execute
andSecurityCouncilNomineeElectionGovernor::createElection
will always revert, since the form ofdescription
at the proposal is not compliant to the format required atGovernorUpgradable
of Openzeppelin.Proof of Concept
When we see the below line at the
GovernorUpgradable
contract at Openzeppelin, it calls_isValidDescriptionForProposer
to check the validity of givendescription
.The
_isValidDescriptionForProposer
is checking if the length ofdescription
to be longer than 52, or it returnstrue
and makepropose
function revert.However, the way
SecurityCouncilNomineeElectionGovernor::_execute
andSecurityCouncilNomineeElectionGovernor::createElection
composedescription
is decided inElectionGovernor::getProposeArgs
, and it returnsdescription
as "Security Council Election #XX" format. This will revert inpropose
function, since its length is under 52 unlesselectionIndex
is large enough. Refer to the below code.Tools Used
By hand
Recommended Mitigation Steps
Change the proposal description format at
ElectionGovernor::electionIndexToDescription
like below:Assessed type
Other