Trail of Bits shared how AI agents audited the Miden zkVM by building an LSP, decompiler, static analysis engine, and Lean models, uncovering a critical Falcon signature forgery bug and validation flaws.Trail of Bits分享了借助AI审计Miden zkVM的经验,构建LSP、反编译器、静态分析与Lean模型,发现可伪造Falcon签名的高危漏洞与多处验证缺陷。Trail of BitsがAIエージェントによるMiden zkVM監査を紹介。LSP、逆コンパイラ、静的解析エンジン、Leanモデルを構築し、Falcon署名偽造の重大な脆弱性と複数の検証欠陥を発見した。
NotesNotes要点
Built an LSP server, decompiler, and static analysis engine for MASM from scratch
Critical bug: unvalidated prover-supplied advice values enabled Falcon signature forgery and fund theft
Static analysis identified 400+ type validation improvements reachable from the public API
How did AI assist the Miden audit?AI如何帮助审计Miden?AIはMidenの監査をどう支援したか?
AI agents built an LSP, decompiler, static analysis engine, and Lean models to uncover critical bugs and verify correctness.AI代理构建了LSP、反编译器、静态分析引擎和Lean模型,帮助发现高危漏洞与形式化验证代码正确性。AIエージェントがLSP、逆コンパイラ、静的解析エンジン、Leanモデルを構築し、重大な脆弱性を発見し正しさを検証した。
What components did Lean proofs cover?Lean证明覆盖了哪些组件?Leanの証明はどの部分をカバーしたか?
They covered 95 correctness proofs for all binary arithmetic components in the core library, ensuring expected stack semantics.覆盖核心库全部二进制算术组件的95个正确性证明,确保过程执行后栈状态符合预期数学语义。コアライブラリの二進算術コンポーネント全てを対象とした95の正しさ証明で、期待されるスタック挙動を保証する。
Why is MASM decompilation hard to guarantee?为何MASM反编译难以保证正确?なぜMASMの逆コンパイルは困難か?
MASM lacks declared signatures and a calling convention, while loops and branches have variable stack effects, causing static inference to fail.因MASM过程无声明签名与统一调用约定,且循环与条件分支栈效应不固定,静态推断极易失败。宣言されたシグネチャや呼び出し規約がなく、ループと条件分岐のスタック効果が可変なため、静的推論が失敗しやすい。