Submitted by Spearbit, also found by Saw-mon_and_Natalie
FulfillmentApplier.sol#L406
The _aggregateValidFulfillmentOfferItems() function aims to revert on orders with zero value or where a total consideration amount overflows. Internally this is accomplished by having a temporary variable errorBuffer, accumulating issues found, and only reverting once all the items are processed in case there was a problem found. This code is optimistic for valid inputs.
Note: there is a similar issue in _aggregateValidFulfillmentConsiderationItems(), which is reported separately.
The problem lies in how this errorBuffer is updated:
The final error handling code:
While the expected value is 0 (success),  1 or 2 (failure), it is possible to set it to 3, which is unhandled and considered as a success. This can be easily accomplished by having both an overflowing item and a zero item in the order list.
This validation error could lead to fulfilling an order with a consideration (potentially ~0) lower than expected.
Craft an offer containing two errors (e.g. with  zero amount and overflow).
Call matchOrders(). Via calls to _matchAdvancedOrders(), _fulfillAdvancedOrders(), _applyFulfillment(), _aggregateValidFulfillmentOfferItems() will be called.
The errorBuffer will get a value of 3  (the or of 1 and 2).
As the value of 3 is not detected, no error will be thrown and the order will be executed, including the mal formed values.
0age (OpenSea) confirmed
HardlyDifficult (judge) decreased severity to Medium
cmichel (warden) commented:
0age (OpenSea) disagreed with Medium severity:
HardlyDifficult (judge) increased severity to High
0xleastwood (judge) commented:
0age (OpenSea) resolved:
