Open c4-submissions opened 1 year ago
0xA5DF marked the issue as sufficient quality report
0xA5DF marked the issue as primary issue
Seems like a user error, but maybe there's a case for an exception here since it's a mistake that's easy for users to fall for. Leaving open for sponsor to comment
0xBugsy (sponsor) confirmed
0xBugsy marked the issue as disagree with severity
No settlements will ever be retriable from Arbitrum Branch, so this is highly unlikely to happen in production. But we will address this.
alcueca changed the severity to QA (Quality Assurance)
alcueca marked the issue as grade-a
Lines of code
https://github.com/code-423n4/2023-09-maia/blob/main/src/ArbitrumBranchBridgeAgent.sol#L89
Vulnerability details
Impact
Users can lose native tokens if they call
ArbitrumBranchBridgeAgent.sol:retrySettlement()
withmsg.value
> 0.Proof of Concept
Since
ArbitrumBranchBridgeAgent
is an branch bridge agent deployed on the arbitrum chain, we override theretrySettlement()
function to let users retry settlements through the root agent directly. However, when override to forbid this function, we make this function always successful:Also, we only rewrite the
@dev
natspec tag, which is for "Explain to a developer any extra details", so the@notice
tag, which is for "Explain to an end user what this does" is unchanged.This can lead:
ArbitrumBranchBridgeAgent.sol:retrySettlement()
with msg.value > 0, the tx is successful and msg.value is left in the bridge agent.executeNoSettlement
,executeWithSettlement
, etc. In which the balance of the agent (includes User A's in step 1) will be transferred out to router and used later:Tools Used
Manual Review.
Recommended Mitigation Steps
executeDepositSingle
,executeDepositMultiple
,executeSigned
,executeSignedDepositMultiple
in the CoreRootRouter.sol, we should directly revert.@notice
natspec tag also.Assessed type
ETH-Transfer