Skip to content
Business logic Audit finding Intermediate

Inconsistent Cohort Replacement Process in Security Council Manager

The SecurityCouncilManager contract's replaceCohort function deletes the old cohort and adds a new one without checking for ongoing elections, so a member could be in both cohorts at once. This contradicts the DAO's constitution and could undermine the integrity of Security Council decisions.

Daniel526 Follow with Daniel526

Originally disclosed on Code4rena

Submitted by Daniel526, also found by Daniel526

The contract SecurityCouncilManager in the Arbitrum DAO’s security council system has an inconsistency in its cohort replacement process. This inconsistency could potentially lead to a situation where a member is present in both the old and new cohorts simultaneously, contradicting the governance rules set out in the DAO’s constitution.

Impact

The inconsistency in the cohort replacement process could lead to a situation where a member is elected to a new cohort while also remaining in the old cohort during ongoing elections. This can create confusion, undermine the democratic process, and potentially compromise the integrity of Security Council decisions. Such a scenario directly contradicts the DAO’s constitution, which requires careful handling of cohort replacement to avoid conflicts.

Proof of Concept

The Arbitrum DAO’s constitution outlines a careful process for replacing cohorts of Security Council members to avoid race conditions and operational conflicts, particularly during ongoing elections. However, the contract implementation lacks the necessary checks to ensure that cohort replacement aligns with ongoing governance activities.

The replaceCohort function is responsible for replacing a cohort with a new set of members. In this function, the old cohort is immediately deleted, and the new cohort is added. This process, while ensuring that only the new members are present in the cohort after replacement, does not account for potential ongoing elections or concurrent transactions.

function replaceCohort(address[] memory _newCohort, Cohort _cohort)
    external
    onlyRole(COHORT_REPLACER_ROLE)
{
    if (_newCohort.length != cohortSize) {
        revert InvalidNewCohortLength({cohort: _newCohort, cohortSize: cohortSize});
    }

    // Delete the old cohort
    _cohort == Cohort.FIRST ? delete firstCohort : delete secondCohort;

    // Add members of the new cohort
    for (uint256 i = 0; i < _newCohort.length; i++) {
        _addMemberToCohortArray(_newCohort[i], _cohort);
    }

    _scheduleUpdate();
    emit CohortReplaced(_newCohort, _cohort);
}

Recommended Mitigation Steps

One possible mitigation is to introduce a mechanism that prevents cohort replacement while an election is ongoing.

Assessed type

Invalid Validation

DZGoldman (Arbitrum) acknowledged


The original report as published on Code4rena, by Daniel526. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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 replaceCohort function lacks a check to prevent replacement while an election is ongoing, allowing a member to be in both old and new cohorts simultaneously.

Impact

This could create confusion, undermine the democratic process, and potentially compromise the integrity of Security Council decisions, contradicting the DAO's constitution.

What the attacker needed

Ongoing election; COHORT_REPLACER_ROLE

The fix

A mechanism should be introduced to prevent cohort replacement while an election is ongoing.

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 security council is a group of people who make important decisions for a DAO (a decentralised organisation). The contract that manages this council lets an admin replace all members of one group at once, but it does not check if an election is currently happening. This means someone could end up being in two groups at the same time, which is against the rules.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by Daniel526

View all

1 more disclosed report, best first.

More from Arbitrum Security Council Election System

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.