You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Despite the protective measures currently implemented, the seller can still make redeemVoucher to revert and effectively force the buyer to either cancel the voucher or let it expire (in either case, the buyer loses the cancellation penalty).
Solidity compiler handles it if the returndata is not used at all (not the case for use).
There is an open issue that addresses the problem. ethereum/solidity#14467
So in the future, we might be able to handle it without the need for assembly.
Despite the protective measures currently implemented, the seller can still make
redeemVoucher
to revert and effectively force the buyer to either cancel the voucher or let it expire (in either case, the buyer loses the cancellation penalty).There are possible attacks:
Returnbomb attack
The twin transfer reverts with insanely long revert data. The return value gets copied into the memory here
boson-protocol-contracts/contracts/protocol/facets/ExchangeHandlerFacet.sol
Line 869 in 9070c04
If the result is of the right size it can consume enough gas to make the transaction fail.
Example:
boson-protocol-contracts/contracts/mock/Foreign20.sol
Lines 251 to 263 in a4949ec
Recommendation
Use a solution like this https://github.com/nomad-xyz/ExcessivelySafeCall which limits the amount of return data copied to the memory.
The text was updated successfully, but these errors were encountered: