[KongchangAI]
· 2 min read· 1,368 words

Formal Verification with Claude: Proving Crash-Free for 123 Open-Source Libraries

Formal Verification with Claude: Proving Crash-Free for 123 Open-Source Libraries

Anthropic used Claude to complete crash-free formal proofs for 123 OSS-Fuzz libraries, but the boundaries need calm scrutiny.

Anthropic used Claude to formally verify 123 OSS-Fuzz open-source libraries, proving their code has no execution paths that cause crashes. This is a mathematical proof, not unit testing or fuzzing. The verified libraries already have a fuzz baseline, and the proofs target memory-safety crashes as incremental guarantees. Conclusions depend strictly on specifications and assumptions; "no crash" does not mean functional correctness or no logic bugs. Well-structured fuzz targets are a key prerequisite, making testing infrastructure investment worthwhile. Claude should be positioned as a verification co-pilot, not a one-click safety button.

Anthropic recently did something quite rare in the software engineering world: it used Claude to formally verify 123 OSS-Fuzz open-source libraries, proving that their code contains no paths that lead to crashes. This is not unit testing, nor is it fuzz testing—it's a mathematical proof. The news comes from an analysis article in an RSS feed, with a title that gets straight to the point: "AI Formal Verification: Claude Proved 123 Libraries Crash-Free."

AI formal verification: Claude proves crash-free for 123 libraries

What formal verification is, and why it's hard

Formal verification is a technique that uses mathematical methods to prove that a program satisfies specific properties. Unlike testing, which can only cover a finite set of inputs, formal verification attempts to cover all possible execution paths. Traditionally, this requires experts to manually write specifications, construct invariants, and guide theorem provers—at extremely high cost. It is typically used only in fields with extreme correctness requirements, such as aerospace and chip design.

Introducing large language models into this process is a direction that has only emerged in the past two years. Claude's role here is most likely to assist in generating the preconditions, loop invariants, and assertions needed for verification, compressing what used to take days or even weeks of manual work into an acceptable range.

Theorem provers and SMT solvers are core components of the formal verification toolchain. Theorem provers (such as Coq, Isabelle, and Lean) require users to provide step-by-step proof scripts, and the kernel mechanically checks whether each step of reasoning is valid; SMT solvers (such as Z3 and CVC5) automatically determine the satisfiability of first-order logic formulas and are often used to verify loop invariants and path conditions. The "verification artifacts" that Claude generates in such workflows are usually assertions, invariants, and proof fragments handed to these tools for checking—the LLM proposes candidates, and the solver makes the final ruling. Together they form a "generate-check" loop, which is also the mechanistic foundation that makes LLM-assisted verification trustworthy.

What the proofs for the 123 libraries cover

According to the original article, these proofs target "no-crash properties," meaning they prove that, under given constraints, the code will not trigger behaviors that terminate the process—such as memory safety violations, null pointer dereferences, or array out-of-bounds accesses. The target libraries come from OSS-Fuzz—Google's open-source fuzz testing infrastructure, which itself includes projects that have undergone some security screening.

This point is worth noting: what was verified is not arbitrary code, but libraries that already have fuzz testing coverage. This lowers the difficulty, and it also means the verification results are incremental guarantees built on top of an existing security baseline.

OSS-Fuzz is a continuous fuzz testing service launched by Google in 2016. It currently covers hundreds of open-source projects, running high-frequency random-input tests against projects through continuous integration, and reporting discovered memory safety vulnerabilities to maintainers as private bugs. Its inclusion criteria require projects to have explicit fuzz targets (test entry functions) and to be buildable in a form callable by engines such as libFuzzer or AFL. Because a fuzz target itself is a wrapper that "takes a byte input and calls the code under test," it naturally provides the function entry point and input contract needed for formal verification—which explains why these libraries are better suited than ordinary open-source projects as a testing ground for LLM-assisted verification.

Where the proofs stop

The original article explicitly mentions "proofs cover what, and where they stop"—this is the part that most needs to be viewed calmly.

The conclusions of formal verification depend strictly on the properties and assumptions that are proven. Proving "no crash" does not equal proving "functional correctness," nor does it equal proving "no logic bugs." If the specification itself is incomplete, the proof can only cover the portion of behavior described by the specification. In addition, LLM-generated verification artifacts need to be checked by a theorem prover, but writing the specification can still introduce blind spots.

Another practical constraint is scale. 123 libraries sounds like a lot, but it is still a subset relative to the thousands of projects included in OSS-Fuzz. Which libraries were selected and what the selection criteria were are not elaborated in the original article, and this affects the generalizability of the conclusions.

The "no-crash property" in the context of formal verification usually means: for all valid inputs to the fuzz target, the code under test will not trigger paths that cause abnormal process termination, such as undefined behavior, division by zero, or out-of-bounds access. Such properties are "safety properties"—they only constrain that "bad things do not happen" and do not require that "good things must happen." By contrast, "functional correctness" requires writing complete input-output specifications, and its proof difficulty is an order of magnitude higher. Therefore, even if all 123 libraries pass crash-free verification, it only shows that there are no triggerable crash paths at the fuzz target entry points of these libraries. For concurrency races, resource leaks, timing-related logic defects, and similar issues, such proofs typically cannot cover them.

How to write fuzz targets is worth learning from

The original article's subtitle mentions "the fuzz-target habits worth copying on Monday," pointing to a very pragmatic point: the reason these libraries could be verified is largely that they already have well-structured fuzz testing targets.

A good fuzz target usually has several characteristics: a clear entry point, explicit input constraints, separated initialization and cleanup logic, and avoidance of reliance on global state. These characteristics not only make fuzz testing more effective but also make formal verification easier to approach—because verification tools need a clear function entry point and describable preconditions.

In other words, teams that invest in testing infrastructure will gain disproportionate returns when they introduce AI-assisted verification. This is the most actionable piece of advice in the original article.

Loop invariants are one of the parts of formal verification that most tests human design: to make a theorem prover understand why a loop satisfies a certain property, one must provide assertions that hold before and after each iteration. The value of LLMs at this step is that they can generate candidate invariants based on code structure and existing assertions, and then the prover verifies whether they are strong enough. But if a candidate invariant is too weak, the proof will fail; if it is too strong, it may not be inductively provable. This kind of "strength tuning" still relies heavily on the judgment of verification engineers, and it is also one of the main reasons LLM output requires human review.

What it means for engineering teams

In the short term, this is more of an accelerator for the verification process than a replacement. Teams still need to understand the properties being verified, review the generated specifications, and interpret the prover's feedback. Treating Claude as a "co-pilot for verification engineers" is a reasonable positioning; treating it as a "one-click security proof" button will create a false sense of security.

In the long term, if the reliability of LLM-generated verification artifacts continues to improve, the applicable boundary of formal verification may expand from high-assurance systems to more ordinary server-side code. The experiment with 123 libraries is a meaningful pathfinding effort in this direction, but there is still a gap before engineering adoption.

One-line Summary

Anthropic used Claude to complete crash-free formal proofs for 123 OSS-Fuzz libraries, but the boundaries need to be viewed calmly.

Paragraph Summary

Anthropic used Claude to formally verify 123 OSS-Fuzz open-source libraries, proving that their code contains no execution paths that lead to crashes. This is different from unit testing or fuzz testing—it is a mathematical proof. The article points out that the verified libraries already have a fuzz testing baseline, and the proofs target memory-safety crashes, serving as incremental guarantees rather than building from scratch. The conclusions of the proofs depend strictly on the written specifications and assumptions; "no crash" does not equal functional correctness or the absence of logic bugs. The article also emphasizes that well-structured fuzz targets are a prerequisite that makes formal verification easier to approach, and they are worth prioritizing investment in testing infrastructure. The current positioning should be as a co-pilot for verification engineers, not a one-click security button.

#formal verification#Claude#OSS-Fuzz#fuzz testing#AI-assisted verification
Share:

Related articles