Missing checks on low-level call #521
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-641
insufficient quality report
This report is not of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2024-01-decent/blob/011f62059f3a0b1f3577c8ccd1140f0cf3e7bb29/src/UTBExecutor.sol#L70
Vulnerability details
Impact
on
UTBExecutor.sol
file theexecute
function has low-levelcall
function as follow ( L64 - L71):as you see there are no checks to ensure
(success, ) = target.call(payload);
According to the Solidity docs :
"The low-level functions call, delegatecall and staticcall return true as their first return value if the account called is non-existent, as part of the design of the EVM. Account existence must be checked prior to calling if needed".
As a result, it is possible that this call will fail and It may be end with fund loses.
Proof of Concept
https://github.com/code-423n4/2024-01-decent/blob/011f62059f3a0b1f3577c8ccd1140f0cf3e7bb29/src/UTBExecutor.sol#L70
Tools Used
Manual review
Recommended Mitigation Steps
consider to adding logic after L70
The text was updated successfully, but these errors were encountered: