Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Valid

Improper Handling of Predecessor Dependencies

Summary

The batch scheduling system contains critical flaws in handling operation dependencies. The scheduleBatch function allows scheduling operations with unexecuted predecessors, while executeBatch lacks proper execution order validation, potentially leading to permanently stuck operations and execution failures.

Vulnerability Details

  1. scheduleBatch Predecessor Handling:

    • Allows dependencies on unexecuted predecessors

    • Creates risk of permanently blocked operations if predecessors fail

  2. executeBatch Timing Issues:

    • Lacks validation of operation scheduling relative to predecessor execution

    • May allow incorrect operation ordering leading to execution failures

Impact

  • Operations can become permanently unexecutable

  • Unclear execution sequencing

  • Late detection of scheduling conflicts

Tools Used

  • Manual code review

  • Foundry testing

  • Static analysis (Slither, Mythril)

Recommendations

  1. Enhance Predecessor Validation:

    if (predecessor != bytes32(0)) {
    if (!isOperationDone(predecessor)) {
    revert PredecessorNotExecuted(predecessor);
    }
    }
  2. Improve Execution Order Checks:

    if (predecessor != bytes32(0)) {
    if (!isOperationDone(predecessor) || _operations[predecessor].timestamp > op.timestamp) {
    revert InvalidExecutionOrder(predecessor);
    }
    }
  3. Add Recovery Mechanisms:

    • Implement admin override capability

    • Add automatic cancellation for unreachable operations

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Validated
Assigned finding tags:

TimelockController::scheduleBatch checks if predecessor is pending OR executed rather than requiring execution as per comment, allowing scheduling before predecessor executes

TimelockController::executeEmergencyAction accepts predecessor parameter but unlike executeBatch doesn't verify it's executed, breaking operation sequencing in emergencies

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Validated
Assigned finding tags:

TimelockController::scheduleBatch checks if predecessor is pending OR executed rather than requiring execution as per comment, allowing scheduling before predecessor executes

TimelockController::executeEmergencyAction accepts predecessor parameter but unlike executeBatch doesn't verify it's executed, breaking operation sequencing in emergencies

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.