Microsoft Edge Vulnerability Research Team: Moving from Vulnerability Discovery to Vulnerability Prevention with Rust and Verus
From Bug Hunting to Bug Prevention with Rust and Verus
The Microsoft Edge browser vulnerability research team shares vulnerability-prevention practices that combine Rust rewrites with Verus formal verification and shift verification left to the writing stage. Rust eliminates memory-safety defects but cannot control arithmetic errors and logic defects that violate specifications; Verus uses requires/ensures contracts plus automated reasoning to rule out such defects. The team built verification twins for three historical Brotli vulnerabilities (an unsigned subtraction underflow triggered by a truncated 4-byte header, an allocation-size multiplication overflow, and a signed narrowing that bypassed clamping); Verus rejected the historical code in all cases and accepted the upstream fixed versions. A new experiment, microsoft/jpeg2000_rs, attaches contracts directly to a production implementation based on ITU-T recommendations, reducing drift between the proof model and the code. The team uses an agentic writing-assistance workflow to lower the barrier to writing proofs, and holds that AI can draft specifications and proofs but humans must review the meaning of contracts; proofs cover only the stated properties and assumptions and are complementary to fuzzing and testing.