Closed code423n4 closed 1 year ago
contested; the numerator and denominator are masked a few lines above so when multiplied they cannot overflow, meaning they must both be equal to 1 for the xor condition to hold after multiplying.
HickupHH3 marked the issue as unsatisfactory: Invalid
yeah, the referenced code does the exact check that the warden's saying isn't. with the 120-bit masking to both the numerator and denominator prior.
Lines of code
https://github.com/ProjectOpenSea/seaport/blob/5de7302bc773d9821ba4759e47fc981680911ea0/contracts/lib/OrderValidator.sol#L151-L158
Vulnerability details
Impact
Detailed description of the impact of this finding.
_validateOrderAndUpdateStatus()
fails to check the condition that the numerator and denominator are both equal to 1Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
_validateOrderAndUpdateStatus()
fails to check the condition that the numerator and denominator are both equal to 1, see below:https://github.com/ProjectOpenSea/seaport/blob/5de7302bc773d9821ba4759e47fc981680911ea0/contracts/lib/OrderValidator.sol#L151-L158
Tools Used
Remix
Recommended Mitigation Steps
We reimplement it as follows: