Platform: Code4rena
Start Date: 10/05/2024
Pot Size: $300,500 USDC
Total HM: 4
Participants: 27
Period: 17 days
Judge: Picodes
Total Solo HM: 1
Id: 375
League: ETH
Rank: 25/27
Findings: 1
Award: $0.00
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Sathish9098
Also found by: Audinarey, Dup1337, K42, KupiaSec, LessDupes, Rhaydden, SpicyMeatball, Takarez, ZanyBonzy, bronze_pickaxe, carlitox477, dontonka, forgebyola, fyamf, guhu95, hihen, josephdara, ladboy233, slvDev, twcctop, xuwinnie, zanderbyte
0 USDC - $0.00
https://github.com/code-423n4/2024-05-arbitrum-foundation/blob/6f861c85b281a29f04daacfe17a2099d7dad5f8f/src/rollup/RollupAdminLogic.sol#L143-L161 https://github.com/code-423n4/2024-05-arbitrum-foundation/blob/6f861c85b281a29f04daacfe17a2099d7dad5f8f/src/rollup/RollupUserLogic.sol#L62-L75
If validator whitelist is not meant to be diasable, and rollup contract is pause for enough time, the whitelist can be removed by calling removeWhitelistAfterFork
and removeWhitelistAfterValidatorAfk
immediatelly after admin unpause rollup contract
If:
Then, immediately after admin call RollupAdminLogic.unpause()
, anyone can call removeWhitelistAfterFork
and removeWhitelistAfterValidatorAfk
, enforcing whitelist mechanism to disable and enabling anyone to submit new assertions.
To solve this:
removeWhitelistAfterFork
and removeWhitelistAfterValidatorAfk
to ensure that rollup contract is not pausedremoveWhitelistAfterFork
or removeWhitelistAfterValidatorAfk
are called to allow validators to confirm assertions.In this way:
abstract contract RollupCore is IRollupCore, PausableUpgradeable { // After already decleared variable //... uint256 public unpauseTimestampGracePeriod //... }
contract RollupAdminLogic is RollupCore, IRollupAdmin, DoubleLogicUUPSUpgradeable { //... - function resume() external override { + function resume(uint256 _unpauseTimestampGracePeriod) external override { + require(_unpauseTimestampGracePeriod >= block.timestamp); + unpauseTimestampGracePeriod = _unpauseTimestampGracePeriod; _unpause(); emit OwnerFunctionCalled(4); } } // ... }
contract RollupUserLogic is RollupCore, UUPSNotUpgradeable, IRollupUser { //... + function _requirePauseChecks(){ + require(!paused(), "CONTRACT_PAUSED"); + require(block.timestamp > unpauseTimestampGracePeriod, "UNPAUSE_GRACE_PERIOD"); + } function removeWhitelistAfterFork() external { + // unpause checks + _requirePauseChecks(); require(!validatorWhitelistDisabled, "WHITELIST_DISABLED"); require(_chainIdChanged(), "CHAIN_ID_NOT_CHANGED"); validatorWhitelistDisabled = true; } /** * @notice Remove the whitelist after the validator has been inactive for too long */ function removeWhitelistAfterValidatorAfk() external { + // unpause checks + _requirePauseChecks(); require(!validatorWhitelistDisabled, "WHITELIST_DISABLED"); require(_validatorIsAfk(), "VALIDATOR_NOT_AFK"); validatorWhitelistDisabled = true; } //...
Invalid Validation
#0 - c4-judge
2024-06-05T11:23:24Z
Picodes marked the issue as satisfactory
#1 - c4-judge
2024-06-10T10:22:13Z
Picodes changed the severity to QA (Quality Assurance)
#2 - c4-judge
2024-06-10T17:24:07Z
Picodes marked the issue as grade-b