Maia DAO - Ulysses - 0xDING99YA'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: 88/175

Findings: 2

Award: $25.79

QA:
grade-a

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Lines of code

https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/VirtualAccount.sol#L84-L112

Vulnerability details

Impact

payableCall() in VirtualAccount.sol has no access control and anyone can steal the token from it

Proof of Concept

payableCall() in VirtualAccount.sol has no access control at all:

function payableCall(PayableCall[] calldata calls) public payable returns (bytes[] memory returnData) { uint256 valAccumulator; uint256 length = calls.length; returnData = new bytes[](length); PayableCall calldata _call; for (uint256 i = 0; i < length;) { _call = calls[i]; uint256 val = _call.value; // Humanity will be a Type V Kardashev Civilization before this overflows - andreas // ~ 10^25 Wei in existence << ~ 10^76 size uint fits in a uint256 unchecked { valAccumulator += val; } bool success; if (isContract(_call.target)) (success, returnData[i]) = _call.target.call{value: val}(_call.callData); if (!success) revert CallFailed(); unchecked { ++i; } } // Finally, make sure the msg.value = SUM(call[0...i].value) if (msg.value != valAccumulator) revert CallFailed(); }

As a result anyone can call any token contract through it and transfer the token in this Virtual Account.

Tools Used

Manual Review

Add requiresApprovedCaller modifier like call().

Assessed type

Access Control

#0 - c4-pre-sort

2023-10-09T07:05:45Z

0xA5DF marked the issue as duplicate of #888

#1 - c4-pre-sort

2023-10-09T07:05:50Z

0xA5DF marked the issue as sufficient quality report

#2 - c4-judge

2023-10-26T11:32:55Z

alcueca marked the issue as satisfactory

Lines of code

https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/BranchPort.sol#L330-L335

Vulnerability details

Impact

setCoreRouter() in BranchPort.sol requires only coreRouter can call it, however, there is no such function in CoreBranchRouter.sol to call this function. As a result this function is unreachable.

Proof of Concept

setCoreRouter() has a requireCoreRouter modifier, so only coreBranchRouter can call it. CoreBranchRouter.sol inherits from the BaseBranchRouter.sol, however, in both these two contracts there is no way to trigger a call to setCoreRouter() in BranchPort.sol. So setCoreRouter() is unaccessible.

Tools Used

Manual Review

in executeNoSettlement() in CoreBranchRouter.sol add a case to call setCoreRouter()

Assessed type

Other

#0 - c4-pre-sort

2023-10-15T05:32:01Z

0xA5DF marked the issue as sufficient quality report

#1 - c4-pre-sort

2023-10-15T05:32:06Z

0xA5DF marked the issue as primary issue

#2 - 0xA5DF

2023-10-15T05:32:34Z

Seems like unused code, which is a QA But will leave open for sponsor to comment if there's any additional impact

#3 - c4-sponsor

2023-10-16T22:57:14Z

0xLightt (sponsor) confirmed

#4 - c4-sponsor

2023-10-16T22:57:33Z

0xLightt marked the issue as disagree with severity

#5 - 0xLightt

2023-10-16T22:58:13Z

There is no impact other than bytecode size, but we should remove this function - that is unused/dead code.

#6 - c4-judge

2023-10-24T14:23:19Z

alcueca changed the severity to QA (Quality Assurance)

#7 - c4-judge

2023-10-24T14:23:26Z

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