distribute DoS on missing receiveRewards implementation
The `distribute` function in the NFTX eligibility manager decodes return data from a fee receiver without checking its length, so a fee receiver that returns no data causes the whole transaction to revert. This allows a single malicious or poorly implemented fee receiver to block all fee distributions, denying other users their rewards.
NFTX contest
Originally disclosed on Code4rena
NFTXEligiblityManager._sendForReceiver should check returnData.length == 1 before decoding. Otherwise, if it returns no return data, the abi.decode call will revert and with it the whole distribute function .
A single poorly implemented feeReceiver can break the whole distribute function and allow a denial of service by reverting the transaction.
Recommend changing to: bool tokensReceived = returnData.length == 1 && abi.decode(returnData, (bool));.
Marking this as high risk because one nefarious feeReceiver can in fact deny other users to receive their fees
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The code calls `abi.decode` on the return data without first checking that the data has the expected length, so an empty return causes a revert.
Impact
A single malicious or faulty fee receiver can cause a denial of service, preventing all other users from receiving their fees.
What the attacker needed
A fee receiver that returns no data; the distribute function is called
The fix
The code should be changed to check the return data length before decoding, as recommended.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a smart contract sends fees to a receiver, it expects a yes/no answer. If the receiver returns nothing, the contract tries to read an answer that isn't there and crashes, stopping everyone else from getting paid. This means one bad receiver can block all payments.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.