Open code423n4 opened 1 year ago
@androolloyd
while we should be requiring that orders are valid, there is currently no incorrect implementation of the orders definition, so its always returning true.
should we update things in the future that break order definition and that isn't caught by tests this would be an issue, is a QA or medium issue
androolloyd marked the issue as disagree with severity
Picodes changed the severity to QA (Quality Assurance)
Low severity in the absence of a PoC where it would return false
.
Picodes marked the issue as grade-a
Lines of code
https://github.com/code-423n4/2023-01-astaria/blob/main/src/ClearingHouse.sol#L207
Vulnerability details
Impact
ClearingHouse's
validateOrder
function calls Seaport'svalidate
function to list the NFT on OpenSea. Seaport'svalidate
returns a boolean value upon success or failure. However, the value isn't validated.This results in (not limited to);
From here you can imagine what else could go wrong.
Proof of Concept
https://github.com/ProjectOpenSea/seaport/blob/main/contracts/lib/Consideration.sol#L457-L464
As you can see, the function doesn't revert on false returned value. The same goes for the internal function
_validate
.The ClearingHouse's
validateOrder
function doesn't check the returned value as well.https://github.com/code-423n4/2023-01-astaria/blob/main/src/ClearingHouse.sol#L207
Tools Used
Manual analysis
Recommended Mitigation Steps
Check if the returned value is true. otherwise, revert.
An example: