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.
Submitted by Zubat, also found by Femboys and n4nika
Impact
Suppose we have a situation where the MIPS geth goes wrong and always panics. The vmStatus can only be either UNFINISHED or PANIC.
In the current execution bisection game system, the UNFINISHED state can not be used as the root claim; the PANIC state can always be attacked. So we can counter every bisection game at SPLIT_DEPTH + 1; none of the claims at SPLIT_DEPTH are challenged. Inductively, claims agreeing with SPLIT_DEPTH are not challengable.
In the current configuration, SPLIT_DEPTH is set to 30, so we can deny any dispute against the root claim at depth 0. If that were to happen, the state of the L2 output root could be hijacked and unrecoverable.
It’s unclear if there are easy methods to trigger panic in the MIPS VM.
One possible way is to leverage the privilege, as the batcher is currently controlled by a centralized trusted entity. Ordinary users cannot construct the batches and channels for the rollup, but the batcher can freely set the payload blob to L1.
https://github.com/code-423n4/2024-07-optimism/blob/main/op-node/rollup/derive/channel.go#L169-L205
A malicious batcher could compress a huge amount of zero blobs, upload them to L1, and force the MIPS VM to decompress them. Considering the limited memory resources of the MIPS VM and the absence of garbage collection in the MIPS go-ethereum, the VM could be very easily corrupted.
Recommended Mitigation Steps
Set the split_depth to an odd number.
Assessed type
DoS
Inphi (Optimism) confirmed and commented:
This is valid. Note that an implicit assumption of the
FaultDisputeGameis that the program being verified must be not contain bugs or panic unexpectedly. But we have not documented this assumption clearly, so we would still like to acknowledge this report.Also note that there are other problems introduced by adjusting the split depth to fix this. Really fixing this will require a multi-proof architecture, to mitigate against a single faulty program taking down the system, rather than tweaks to a dispute game.
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
Likely the dispute game logic does not handle a panicking VM state, so a panic at a chosen depth can be used to block challenges to the root claim.
Impact
If the MIPS VM can be made to panic, a malicious batcher could make the L2 output root unchallengeable and hijack it, though the report says it is unclear whether a panic is easy to trigger.
What the attacker needed
Control of the batcher role; ability to make the MIPS VM panic
The fix
The report suggests setting the split depth to an odd number, but the maintainer notes this introduces other problems and a real fix needs a multi-proof architecture.
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.
A dispute game lets two sides argue step by step about whether a claimed result is correct. If the program that checks each step crashes (a panic) instead of giving an answer, the argument can be stalled at a certain level, so the original claim is never properly tested. Here that could let someone lock in a wrong result about the layer-2 chain.
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.