code-423n4 / 2022-05-opensea-seaport-findings

1 stars 0 forks source link

QA Report #80

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago
  1. Missing zero address check *ConduitController.createConduit() - initialOwner parameter - https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/conduit/ConduitController.sol#L94

  1. Missing input validation on array lengths match The functions below fail to perform input validation on arrays to verify the lengths match.A mismatch could lead to an exception or undefined behavior.

*Occurrences in: https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/Consideration.sol#L215-L237 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/Consideration.sol#L300-L323 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/Consideration.sol#L349-L360 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/Consideration.sol#L398-L410 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/CriteriaResolution.sol#L43-L209 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/FulfillmentApplier.sol#L493-L759 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/FulfillmentApplier.sol#L141-L185 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/FulfillmentApplier.sol#L198 OrderCombiner._fulfillAvailableAdvancedOrders() *OrderCombiner._validateOrdersAndPrepareToFulfill()

**Mitigation: Add input validation to check that the length of both arrays match.


  1. Check if a value is in an array before a push In ConduitController.sol's updateChannel() function, it's possible to push an existing address channel several times in the same arrayhttps://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/conduit/ConduitController.sol#L143

  1. Array .length Used Directly In For Loops There is additional gas usage when an array's length value is used directly in a "for" loop.

*Occurrences in: https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/OrderCombiner.sol#L621 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/OrderFulfiller.sol#L217 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/OrderFulfiller.sol#L306

0age commented 2 years ago

2 and 3 are incorrect

0age commented 2 years ago

1 is valid, low severity + duplicate

HardlyDifficult commented 2 years ago

Grouping with warden's QA report #30

HardlyDifficult commented 2 years ago

Warden submitted multiple QA reports. Will not be judged.