Logic error in OVM implementation of selfdestruct
Days in Operation:
Whitehat Jay Freeman (Saurik), known for developing Cydia, reported a critical vulnerability in the Optimism protocol, a Layer 2 (L2) scaling solution for Ethereum. The bug itself would have allowed an attacker to replicate money continuously on any chain using a vulnerability found in OVM 2.0. For this disclosure, the project paid out the full critical amount listed on Immunefi’s bug bounty page for Optimism: $2,000,042!
The bug was found in one of the implementations of a portion of the EVM’s execution logic, i.e., an opcode, which would have allowed a potential attacker to print an unlimited amount of money. That money could be then bridged from Optimism to Ethereum, allowing a hacker to steal large amounts of money.
The issue is with setting the balance of an account after selfdestruct to 0. Due to this bug, when a contract is selfdestructed, it gives the balance of the calling contract to the target AND still keeps the original balance. An attacker could have used this bug to inflate the balance of the target contract by repeatedly selfdestructing a contract that holds Ether. After several iterations the attacker can then “cash out” the inflated Ether balance, thus creating the money out of thin air.
DISCLAIMER: While web3rekt has used the best efforts in aggregating and maintaining this database, this web site makes no representations or warranties with respect to the accuracy or completeness of its information and data herein, and specifically disclaim any implied warranties of merchantability or fitness for any particular purpose.
Under no circumstances, shall web3rekt be liable for any loss of profit or funds, any regulatory or governmental penalties, any legal costs, or any other commercial and non-commercial damages, including but not limited to special, incidental, consequential, or other damages from any or all usage of the data and information derived from this database.