executor's execute might be DOSed leading to initaitor losing all transaction gas #611
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-70
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
Medium, tranasaction initiator might lost whole gas while the transaction reverts.
Proof of Concept
executor.execute() is run with extraNative parameter hardocoded to 0, thus the flow of execution is as below:
The target.call is perfomed without specifying the gas sent, thus 63/64 of available gas is sent with the call.
In the case of malicous 'target' the whole gas might be spend on this call, while the 1/64 might not be enough to cover the token balanceOF call thus reverting the transaction.
As a result, the transaction initiator lost gas.
Tools Used
VSCode
Recommended Mitigation Steps
Assessed type
Other
The text was updated successfully, but these errors were encountered: