Maia DAO - Ulysses - DanielArmstrong's results

Harnessing the power of Arbitrum, Ulysses Omnichain specializes in Virtualized Liquidity Management.

General Information

Platform: Code4rena

Start Date: 22/09/2023

Pot Size: $100,000 USDC

Total HM: 15

Participants: 175

Period: 14 days

Judge: alcueca

Total Solo HM: 4

Id: 287

League: ETH

Maia DAO

Findings Distribution

Researcher Performance

Rank: 102/175

Findings: 1

Award: $25.68

QA:
grade-a

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2023-09-maia/blob/main/src/ArbitrumCoreBranchRouter.sol#L168

Vulnerability details

Impact

The router in Arbitrum branch is not upgradable at all, even when the router has serious problem or has necessity of upgrade.

Proof of Concept

The executeNoSettlement function of CoreBranchRouter can change coreBranchRouterAddress of BranchPort. But the overrided executeNoSettlement function of ArbitrumCoreBranchRouter cannot change coreBranchRouterAddress of BranchPort. As a result, there is no way to change router in Arbitrum branch.

CoreBranchRouter.sol#140-146 call setCoreBranchRouter function of BranchPort and change coreBranchRouterAddress of it in the case of _params[0] == 0x07.

        } else if (_params[0] == 0x07) {
            (address coreBranchRouter, address coreBranchBridgeAgent) = abi.decode(_params[1:], (address, address));

            IPort(localPortAddress).setCoreBranchRouter(coreBranchRouter, coreBranchBridgeAgent);

            /// Unrecognized Function Selector
        } else {

On the other hand, ArbitrumCoreBranchRouter.sol#162-170 does not process the case of _params[0] == 0x07 and revert.

        } else if (_data[0] == 0x06) {
            (address portStrategy, address underlyingToken, uint256 dailyManagementLimit, bool isUpdateDailyLimit) =
                abi.decode(_data[1:], (address, address, uint256, bool));
            _managePortStrategy(portStrategy, underlyingToken, dailyManagementLimit, isUpdateDailyLimit);

            /// Unrecognized Function Selector
        } else {
            revert UnrecognizedFunctionId();
        }

As a result, there is no way to change router in Arbitrum branch.

Tools Used

Mannual Review

Insert code into ArbitrumCoreBranchRouter.sol#162 as follows.

        } else if (_data[0] == 0x06) {
            (address portStrategy, address underlyingToken, uint256 dailyManagementLimit, bool isUpdateDailyLimit) =
                abi.decode(_data[1:], (address, address, uint256, bool));
            _managePortStrategy(portStrategy, underlyingToken, dailyManagementLimit, isUpdateDailyLimit);

            /// _setCoreBranchRouter
        } else if (_params[0] == 0x07) {
            (address coreBranchRouter, address coreBranchBridgeAgent) = abi.decode(_params[1:], (address, address));

            IPort(localPortAddress).setCoreBranchRouter(coreBranchRouter, coreBranchBridgeAgent);

            /// Unrecognized Function Selector
        } else {
            revert UnrecognizedFunctionId();
        }

Assessed type

Error

#0 - c4-pre-sort

2023-10-14T10:42:35Z

0xA5DF marked the issue as low quality report

#1 - 0xA5DF

2023-10-14T10:42:38Z

The router in Arbitrum branch is not upgradable at all, even when the router has serious problem or has necessity of upgrade.

QA

#2 - c4-judge

2023-10-23T09:35:41Z

alcueca changed the severity to QA (Quality Assurance)

#3 - c4-judge

2023-10-23T09:35:46Z

alcueca marked the issue as grade-a

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