-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replenishing gas is missing in _payFallbackGas
of RootBridgeAgent
#786
Comments
trust1995 marked the issue as primary issue |
trust1995 marked the issue as satisfactory |
trust1995 changed the severity to 3 (High Risk) |
0xBugsy marked the issue as sponsor confirmed |
trust1995 marked issue #397 as primary and marked this issue as a duplicate of 397 |
trust1995 marked the issue as not a duplicate |
trust1995 marked the issue as primary issue |
trust1995 marked the issue as selected for report |
trust1995 changed the severity to 2 (Med Risk) |
We recognize the audit's findings on Anycall Gas Management. These will not be rectified due to the upcoming migration of this section to LayerZero. |
Lines of code
https://github.com/code-423n4/2023-05-maia/blob/main/src/ulysses-omnichain/RootBridgeAgent.sol#L831-L846
Vulnerability details
Impact
_payFallbackGas
is used to update the user deposit with the amount of gas needed to pay for the fallback function execution.However, it doesn't replenish gas. In other words, it doesn't deposit the executionGasSpent into AnycallConfig execution budget.
Proof of Concept
Here is the method body.
https://github.com/code-423n4/2023-05-maia/blob/main/src/ulysses-omnichain/RootBridgeAgent.sol#L831-L846
As you can see, no gas replenishing call.
_payFallbackGas
is called at the end inanyFallback
after reopening user's settlement.https://github.com/code-423n4/2023-05-maia/blob/main/src/ulysses-omnichain/RootBridgeAgent.sol#L1177
Tools Used
Manual analysis
Recommended Mitigation Steps
Withdraw Gas from port, unwrap it, then call _replenishGas to top up the execution budget
Assessed type
Other
The text was updated successfully, but these errors were encountered: