Skip to content
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 ETH call success check -> . ETH may not successfully transfer out and get stuck in the UTBExecutor contract. #340

Closed
c4-bot-7 opened this issue Jan 22, 2024 · 3 comments
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate-25 insufficient quality report This report is not of sufficient quality unsatisfactory does not satisfy C4 submission criteria; not eligible for awards

Comments

@c4-bot-7
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2024-01-decent/blob/main/src/UTBExecutor.sol#L64-L68

Vulnerability details

Impact

ETH may not successfully transfer out and get stuck in the UTBExecutor contract, precisely in the execute function.

Proof of Concept

In the execute function, when extraNative > 0 the function tries to transfer ETH to the target and if not succeed, then it tries to transfer ETH to the refund address instead. However, the second transfer to the refund address does not check for transfer success (missing require(success)). This means that the ETH that was supposed to send to the refund address may not be successfully transferred.

This can easily happen when the refund address is a contract and did not implement the fallback/receive function properly.

Tools Used

Manual Review

Recommended Mitigation Steps

  • Add require(success) check after ETH transfer attempt to the refund address.

Assessed type

ETH-Transfer

@c4-bot-7 c4-bot-7 added 3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working labels Jan 22, 2024
c4-bot-1 added a commit that referenced this issue Jan 22, 2024
@c4-pre-sort
Copy link

raymondfam marked the issue as insufficient quality report

@c4-pre-sort c4-pre-sort added the insufficient quality report This report is not of sufficient quality label Jan 24, 2024
@c4-pre-sort
Copy link

raymondfam marked the issue as duplicate of #25

@c4-judge c4-judge added the unsatisfactory does not satisfy C4 submission criteria; not eligible for awards label Feb 2, 2024
@c4-judge
Copy link

c4-judge commented Feb 2, 2024

alex-ppg marked the issue as unsatisfactory:
Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate-25 insufficient quality report This report is not of sufficient quality unsatisfactory does not satisfy C4 submission criteria; not eligible for awards
Projects
None yet
Development

No branches or pull requests

3 participants