-
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
UTBExecutor.execute
function doesn't revert on failure
#641
Comments
raymondfam marked the issue as insufficient quality report |
raymondfam marked the issue as duplicate of #70 |
alex-ppg marked the issue as not a duplicate |
alex-ppg marked the issue as primary issue |
This and all duplicate submissions detail how the The code executes as expected given that the |
alex-ppg marked the issue as unsatisfactory: |
Lines of code
https://github.com/code-423n4/2024-01-decent/blob/main/src/UTBExecutor.sol#L69-L80
Vulnerability details
Impact:
The identified issue in the
execute
function poses a potential risk due to the absence of a revert mechanism in case the external call totarget
fails. If the external call execution fails, there is no reversion of state, which may result in funds being left in the contract without proper handling. This lack of a revert mechanism on failed external calls could lead to potential funds loss and unexpected behavior in the protocol.Proof of Concept:
The issue is evident in the
execute
function, where there is no revert mechanism if the external call totarget
fails:As it can be seen when making the external call to the
target
contract, the bool return valuesuccess
is not checked and so if that call did fail (for some reason but did not revert just returnedsuccess == false
) theexecute
function will not revert which mean that any funds sent/taken by thattarget
contract won't be returned to the caller leading to a financial loss.Tools Used:
Manual review
Recommended Mitigation Steps:
Update the
execute
function to check the return valuesuccess
and revert in case the external call totarget
failssuccess == false
.Assessed type
call/delegatecall
The text was updated successfully, but these errors were encountered: