The createOrder and settle functions do not fully validate the order data, such as checking for negative values or ensuring the data is not stale.
The vulnerability can be found in the lines of code below;
Proof of Concept (PoC):
An attacker submits an order with invalid parameters, such as a negative size delta or stale data.
The createOrder or settle functions use the invalid data to execute orders, leading to incorrect executions.
Example:
function createOrder(Order.OrderType orderType, OrderData memory orderData) external returns (bytes32) {
// GMX-specific logic
}
If orderData contains invalid parameters, the order execution will be incorrect.
Insufficient validation could lead to incorrect order executions and protocol instability.
Add checks for negative values and ensure the order data is not stale.
Implement additional validation mechanisms to ensure data accuracy.
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.
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.
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.