The getExecutionGasLimit function in GmxProxy accepts an unconstrained _callbackGasLimit parameter without validating it against the GMX system's MAX_CALLBACK_GAS_LIMIT configuration, MAX_CALLBACK_GAS_LIMIT
The getExecutionGasLimit function in GmxProxy does not enforce an upper bound on _callbackGasLimit. GMX’s keys.sol defines a MAX_CALLBACK_GAS_LIMIT, but it is not utilized in this function. This could allow excessively high callback gas limits, leading to unintended overestimations of execution fees.
GMX already defines a limit: Keys::MAX_CALLBACK_GAS_LIMIT
Overestimation of Execution Fee
Order execution reverts, due to wrong/overestimation of gas costs
Manua Review
Enforce a Cap on _callbackGasLimit
Modify getExecutionGasLimit to include a validation check:
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
There is no real proof, concrete root cause, specific impact, or enough details in those submissions. Examples include: "It could happen" without specifying when, "If this impossible case happens," "Unexpected behavior," etc. Make a Proof of Concept (PoC) using external functions and realistic parameters. Do not test only the internal function where you think you found something.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.