Open c4-submissions opened 1 year ago
0xA5DF marked the issue as duplicate of #898
0xA5DF marked the issue as sufficient quality report
alcueca marked the issue as duplicate of #685
alcueca changed the severity to QA (Quality Assurance)
The Router is not expected to hold funds, and callers of unsigned functions should know that. They are minted in the Router to be immediately used. If they make an error and leave their tokens in the Router, then it not expected that they will be protected.
alcueca marked the issue as grade-b
Lines of code
https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/MulticallRootRouter.sol#L203-L205 https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/interfaces/BridgeAgentConstants.sol#L15 https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/CoreRootRouter.sol#L350-L357 https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/RootBridgeAgentExecutor.sol#L82-L106 https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/RootBridgeAgent.sol#L490-L512
Vulnerability details
Impact
The callOutAndBridge function on Branches allow users to bridge tokens to other chains, which first need to go through the root implementation on Arbitrum. However, there is a chance after bridging to the root, funds get stuck on the RootCoreRouter contract with the deposit nonce being spent when no extra data is passed into the payload.
Proof of Concept
Tools Used
Foundry
Recommended Mitigation Steps
In the case where no extra data is passed into the payload to be used on the root chain to forward the tokens to the intended destination, the transaction should be reverted, allowing the user to retrieve their deposit on the branch chain they're bridging from.
Assessed type
Token-Transfer