code-423n4 / 2021-05-nftx-findings

1 stars 0 forks source link

`distribute` DoS on missing `receiveRewards` implementation #46

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

@cmichelio

Vulnerability details

Vulnerability Details

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.

Recommended Mitigation Steps

Change to: bool tokensReceived = returnData.length == 1 && abi.decode(returnData, (bool));.

cemozerr commented 3 years ago

Marking this as high risk because one nefarious feeReceiver can in fact deny other users to receive their fees