-
Notifications
You must be signed in to change notification settings - Fork 3
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
Missing payable keyword in function receiveFromBridge() in DecentBridgeAdapter #620
Comments
raymondfam marked the issue as insufficient quality report |
Intended design as IUTB(utb).receiveFromBridge() isn't payable either. |
raymondfam marked the issue as primary issue |
The confusion in this submission and the code's structure arises from the lack of access control in Specifically, the cross-chain transfers between As the As the vulnerability will solely arise from misuse of the |
alex-ppg changed the severity to QA (Quality Assurance) |
Based on other QA reports submitted in the contest I am inclined to award this a |
alex-ppg marked the issue as grade-c |
Hi @alex-ppg, thank you for the detailed response. I believe issue this is valid since: Based on the comment I've provided on #647, keeping the bridge() and bridgeWithPayload() function publicly accessible in the DecentEthRouter is intentional since decent bridge charges no bridge fees. Additionally, there is no misconfiguration of the call happening here since the issue is talking about delivering ETH on a chain where ETH is the gas currency, which is why this condition Please consider re-evaluating this issue. Thank you. |
Hey @mcgrathcoutinho, thanks for following up on your original concerns in #647. You can consult #647 again to confirm that these functions should not be publicly accessible. Based on the above, my original ruling stands and can be considered final. |
Lines of code
https://github.com/code-423n4/2024-01-decent/blob/07ef78215e3d246d47a410651906287c6acec3ef/src/bridge_adapters/DecentBridgeAdapter.sol#L127
Vulnerability details
Impact
Currently, the DecentBridgeExecutor has two functions, namely, _executeWeth() and _executeEth(). The contract approves the WETH correctly to the adapter but it is not able to send the ETH since the receiveFromBridge() function is not marked payable. Due to this, the user would lose funds since the call to the payload (i.e. receiveFromBridge) always reverts.
Proof of Concept
Tools Used
Manual Review
Recommended Mitigation Steps
Add the payable keyword to the function receiveFromBridge() to allow accepting ETH when sent from executor.
Assessed type
Error
The text was updated successfully, but these errors were encountered: