Party DAO - Emmanuel's results

Protocol for group coordination.

General Information

Platform: Code4rena

Start Date: 31/10/2023

Pot Size: $60,500 USDC

Total HM: 9

Participants: 65

Period: 10 days

Judge: gzeon

Total Solo HM: 2

Id: 301

League: ETH

PartyDAO

Findings Distribution

Researcher Performance

Rank: 21/65

Findings: 2

Award: $385.16

QA:
grade-a

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Awards

199.934 USDC - $199.93

Labels

bug
3 (High Risk)
satisfactory
sufficient quality report
duplicate-233

External Links

Lines of code

https://github.com/code-423n4/2023-10-party/blob/main/contracts/party/PartyGovernance.sol#L465 https://github.com/code-423n4/2023-10-party/blob/main/contracts/party/PartyGovernance.sol#L636-L638

Vulnerability details

Impact

Protocol's intended functionality is: If all hosts accept a passed proposal, then veto period for that proposal will be skipped, and Proposal will immediately be "Ready" for execution. Note that the requirement is "ALL HOSTS accept a proposal", but a single host can maliciously increase the numHostsAccepted count, and make it look like all hosts actually accepted the proposal, which will make the proposal ready for execution against the intention of the other hosts. This allows malicious proposals to skip veto period and immediately become ready for execution, which may negatively affect other hosts and the Party in general

Proof of Concept

Looking at LINE 636 of PartyGovernance#accept function, we can see that if the caller is a host, the numHostsAccepted count is incremented. this line prevents the host from voting twice on a proposal.

The problem is, the caller, who is a host can call PartyGovernance#abdicateHost to transfer host status to another address, and then vote again with that address, which would increment the numHostsAccepted count. He can repeat this numHosts times so that this check passes, and _getProposalStatus returns "Ready", which will allow execution of the proposal against the intention of the other hosts

Tools Used

Manual Review

Consider implementing the following: Snapshot the Hosts status each time abdicateHost is called, and instead of checking the current host status of msg.sender, the snapshotted host status as at proposalCreationTime should be used.

Assessed type

Invalid Validation

#0 - c4-pre-sort

2023-11-11T13:13:25Z

ydspa marked the issue as duplicate of #538

#1 - c4-pre-sort

2023-11-11T13:13:32Z

ydspa marked the issue as sufficient quality report

#2 - c4-judge

2023-11-19T13:31:50Z

gzeon-c4 marked the issue as satisfactory

Awards

185.2313 USDC - $185.23

Labels

bug
downgraded by judge
grade-a
QA (Quality Assurance)
insufficient quality report
Q-04

External Links

Lines of code

https://github.com/code-423n4/2023-10-party/blob/main/contracts/party/PartyGovernanceNFT.sol#L479 https://github.com/code-423n4/2023-10-party/blob/main/contracts/party/PartyGovernanceNFT.sol#L486

Vulnerability details

Impact

Once a Party adds an authority, it can NEVER remove it even when an upgrade of Authorities is required. Instead, it depends on the authority to abdicate at will.

Proof of Concept

Authorities have "root user privileges", and while they are trusted, there will be scenarios where a Party might want to totally remove an authority and add a new one, (e.g. due to some needed functionality).

Parties have the ability to addAuthority through a proposal, but there is no corresponding function for the party to remove an authority. Instead, Parties rely on the authority to call the abdicateAuthority function to relinquish the authority role.

This means that an authority can be stuck with a Party forever, which is dangerous, given the amount of privileges it has

Tools Used

Manual Review

Just like the addAuthority function, there should be a removeAuthority function as well which should have the onlySelf modifier

Assessed type

Other

#0 - ydspa

2023-11-11T08:13:32Z

QA

#1 - c4-pre-sort

2023-11-11T08:13:38Z

ydspa marked the issue as insufficient quality report

#2 - c4-judge

2023-11-19T14:26:45Z

gzeon-c4 changed the severity to QA (Quality Assurance)

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter