Closed code423n4 closed 1 year ago
Picodes marked the issue as primary issue
0xhiroshi marked the issue as sponsor disputed
this is intentional, we need to support marketplaces that support batch orders in the future while maintaining the same interface
Lines of code
https://github.com/code-423n4/2022-11-looksrare/blob/e3b2c053f722b0ca2dce3a3eb06f64859b8b7a6f/contracts/libraries/OrderStructs.sol#L6-L17 https://github.com/code-423n4/2022-11-looksrare/blob/e3b2c053f722b0ca2dce3a3eb06f64859b8b7a6f/contracts/proxies/LooksRareProxy.sol#L74 https://github.com/code-423n4/2022-11-looksrare/blob/e3b2c053f722b0ca2dce3a3eb06f64859b8b7a6f/contracts/proxies/SeaportProxy.sol#L248
Vulnerability details
Impact
In OrderStructs.sol, the struct BasicOrder stores an array of uint256 to store multiple tokenIds. However the seaport/looksrare proxies arent set up to handle multiple tokenIds within a single order and can only execute for the 1st id in the order.
Proof of Concept
SeaportProxy.sol:
LooksRareProxy.sol:
Tools Used
forge
Recommended Mitigation Steps
Either change uint256[] to uint256 in BasicOrder struct, or implement a loop in the market proxies to loop over multiple tokenids and amounts with an order