Miscompilations cause zkVMs to prove incorrect program outputs
Compiler bugs can make zkVM proofs validate wrong program behavior
Software arXiv 3 Nov 2026 Measurement Real-world evidence
Published as “Proving the Wrong Program: Miscompilations as a Threat to zkVM Guarantees”
Why it matters
Miscompilation bugs can undermine zkVM guarantees, so developers must audit compiler versions and consider formal verification of the compilation pipeline.
Summary
More than half of the known Rust and LLVM miscompilation bugs reproduce on zkVMs and can cause the zkVM to prove an incorrect output. On SP1, 33 of 60 LLVM bugs and 15 of 28 rustc bugs reproduced, and the zkVM accepted the wrong result as valid. However, most real guest programs are unaffected: 447 of 552 builds were byte-identical, and only 12 of 366 project-bug pairs yielded exploitable patches, at a median cost of $40 per project. The evidence comes from a systematic evaluation of 88 bugs across two zkVMs and 13 real-world guest programs, but the study does not claim exhaustive coverage of all possible attacks.
What they found 2
- zkVMs inherit compiler miscompilation bugs and more than half of the bugs reproduce, leading to provable wrong outputs.
“Finding 1 (RQ1). zkVMs can inherit the miscompilation bugs of the compilers they reuse. More than half of the LLVM and rustc bugs in our dataset reproduce on each zkVM.”
- LLM-driven patch search can produce exploitable patches in a minority of cases, at modest cost.
“The agent succeeded for 12 of the 366 pairs of a project and a bug that it tried, in 11 of the 20 projects, at a median cost of about $40 per project.”
Caveats 4
- Four bugs cause traps or non-termination rather than wrong outputs, so they are counted as not reproduced.
- Many bugs (e.g., 15 LLVM bugs on SP1) result in byte-identical builds because the target lacks required ISA extensions.
- In two cases the buggy build reads an invalid address that crashes on a CPU but reads harmlessly on the zkVM, yielding no divergence.
- We do not claim that our search is complete.
What’s new here 4
- First systematic measurement of how historic Rust/LLVM miscompilation bugs affect zkVM guarantees.
- Construction of a curated dataset of 88 reproducible miscompilation bugs with Rust-level reproducers for zkVM targets.
- Demonstration that LLM agents can translate LLVM-IR bugs to Rust and automatically search for adversarial patches in real zkVM projects.
- Quantitative separation of accidental impact (most builds unchanged) versus adversarial impact (few successful exploit patches).