Skip to content

Code4rena

Optimism Superchain

Every publicly disclosed report for Optimism Superchain and what kind of bugs they were.

disclosed reports
16
most reported class
Business logic
bug classes found
5
first disclosure
2024
Find Optimism Superchain on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Optimism Superchain chose to make public.

Smart contracts

Multiplication overflow leading to memory corruption and incorrect register write-back

The MIPS contract's multiplication of two signed 32-bit integers is performed in an unchecked block, which the reporter claims can overflow and cause incorrect values to be written to memory and registers. An attacker could potentially corrupt contract state or break MIPS functionality.

Optimism Superchain

Medium
Business logic

Invalid DISPUTED_L2_BLOCK_NUMBER is passed to VM

The smart contract passes a disputed L2 block number to the VM that is always starting block + trace index + 1, ignoring the actual claimed block number. This allows an attacker to challenge a valid claim for a block earlier than the safe head by extending the trace to a later safe block, causing the honest party's defence to fail.

Optimism Superchain

High
Memory corruption

Unvalidated memory access in readMem and writeMem functions

The readMem and writeMem functions in the MIPS contract only check 4-byte alignment, not whether the address is within the intended memory range. An attacker could potentially read or write to arbitrary memory addresses, manipulating sensitive state variables like preimageKey, pc, or heap.

Optimism Superchain

Medium
Business logic

An attacker can bypass the challenge period during LPP finalization

The timestamp used to enforce the challenge period in large preimage proposals is only set when the submitter passes a finalize flag, so a malicious submitter can skip that flag and finalize an invalid proposal immediately. This lets an attacker bypass the challenge period and forge invalid claims that are then used in the fault dispute game.

Optimism Superchain

High
DoS

L2 precompile calls can be impossible to reproduce on L1

The OP fault proof system replaces certain L2 precompile calls with preimage oracle queries that must be reproducible on L1. Because the bn256Pairing precompile can consume nearly the entire L2 block gas limit, the corresponding L1 preimage load can require more gas than a block allows, making the step impossible to execute and preventing invalid state transitions from being countered.

Optimism Superchain

High
Business logic

The LPP challenge period can cause malicious and freeloader claims to be uncounterable and can also cause freeloader claims to be abused to entrap honest challengers

The LPP challenge period can cause malicious and freeloader claims to be uncounterable, and freeloader claims can be abused to entrap honest challengers, leading to stolen bonds. An attacker could force an honest challenger to inherit a clock smaller than the challenge period, making it impossible to counter a freeloader claim at MAX_GAME_DEPTH and steal the honest party's bond.

Optimism Superchain

High
Smart contracts

LPP metadata can be altered after the challenge period is over, allowing incorrect states to be proven

The initLPP function allows re-initializing an existing large preimage proposal, overwriting its partOffset and claimedSize metadata even after the challenge period has ended. An attacker can then squeeze the proposal with an incorrect claimedSize, causing the MIPS VM to produce an incorrect state and potentially win a fault dispute game dishonestly.

Optimism Superchain

High
Business logic

Missing address check for instructions LH and LHU

The MIPS virtual machine implementation in Optimism's contracts does not check that the address for the LH and LHU instructions is naturally aligned (2-byte aligned), as required by the MIPS specification. An attacker could potentially exploit this divergence from the spec, though no adverse effects have been observed to date.

Optimism Superchain

Medium
Smart contracts

Honest party’s move could become invalid when re-org takes place

When a blockchain reorganisation occurs, the addresses of dispute games can swap, causing an honest party's move to be applied to the wrong game and their bond to be lost. The report describes two scenarios where this can happen despite a previous fix.

Optimism Superchain

Medium
Business logic

MIPS - Incorrect implementation of SRAV instruction

The MIPS emulator used in the dispute game implemented the SRAV shift instruction without masking the shift count to the low five bits of the register, so large shift amounts produced zero instead of the correct arithmetic shift. This could cause a valid root claim to be resolved as false.

Optimism Superchain

Medium
DoS

Panic in MIPS VM could lead to unchallengeable L2 output root claim

The fault dispute game assumes the MIPS VM never panics, but if it does, a challenger can counter every bisection at one depth so that claims at the split depth are never challenged. This could let a malicious batcher force a panic and make a false L2 output root unchallengeable.

Optimism Superchain

Medium
Business logic

The LPP proposer may not be reimbursed their gas costs by the bonds at MAX_GAME_DEPTH because step() does not check if the LPP proposer is the one that called it

The step() function in the FaultDisputeGame contract does not check who proposed the Large Preimage Proposal (LPP) when awarding the bond, so an attacker can call squeezeLPP() and then step() to receive the bond that was intended to reimburse the LPP proposer for their high gas costs.

Optimism Superchain

Medium
Access control

Addresses can be pre-populated with bad data

The PreimageOracle contract allows anyone to load preimage data for any address, including future precompile addresses, and mark it as valid. An attacker could pre-populate data for a precompile that does not yet exist, so that when that precompile is later added and accelerated, the stored data would be accepted as valid, potentially allowing invalid proofs to be validated.

Optimism Superchain

Medium
Smart contracts

The MIPS doesn’t implement ADD , ADDI , and SUB instructions correctly

The MIPS contract's ADD, ADDI and SUB instructions wrap on overflow instead of raising the Integer Overflow exception the MIPS specification requires. The author claims this lets a malicious actor forge invalid claims and challenge valid claims, though the judge found no current way to trigger it.

Optimism Superchain

Medium