5

Haven't tested it out but I think in theory this could work. It might work somehing like this:

An attacker first writes a lot of data to storage so there is data to be deleted.

Using .send() in the contract to be attacked the attacker gets his fallback function called and frees up space with delete() so he gets more gas to work with than actually should be possible leaving him with enough gas to execute an Reentrant attack.

Is this even possible? And if not, why not?

4

It's not possible because the negative gas is accumulated in a separate refund counter and only provided at the very end of the transaction (up to a maximum of half the gas used). See What are the limits to gas refunds?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.