NFTXEligiblityManager._sendForReceiver should check returnData.length == 1 before decoding, otherwise if it returns no return data, the abi.decode call and with it the whole distribute function will revert.
Impact
A single badly implemented feeReceiver can break the whole distribute function and do a denial of service by reverting the transaction.
Handle
@cmichelio
Vulnerability details
Vulnerability Details
NFTXEligiblityManager._sendForReceiver
should checkreturnData.length == 1
before decoding, otherwise if it returns no return data, theabi.decode
call and with it the wholedistribute
function will revert.Impact
A single badly implemented
feeReceiver
can break the wholedistribute
function and do a denial of service by reverting the transaction.Recommended Mitigation Steps
Change to:
bool tokensReceived = returnData.length == 1 && abi.decode(returnData, (bool));
.