D. J. Bernstein
Proofs

False computer-checked proofs

There are some computer programs that claim to check every step in a proof. However, various "soundness bugs" have been reported that at least potentially allowed false statements to slip past these programs. In many cases, these bugs have been demonstrated to be exploitable.

The list near the bottom of this page links to what appear to be reports of soundness bugs for various important proof-checking programs, sorted in increasing order of the number of reports. This list includes many more soundness bugs for these programs than the bugs mentioned in 2026 Paulson and 2026 StΓ©rin, and I don't think the list is missing any of the bugs mentioned there, but I've probably missed some reports. Please let me know about any corrections or additions.

Beware that this list doesn't include user-interface vulnerabilities. Those can have the same important effect of misleading a user as to what has been proven. See, e.g., 2016 Adams.

Advice

One standard path towards security is to minimize the complexity of the trusted computing base, which by definition is the part of the system that security reviewers need to check. From this perspective, HOL Light's proof-checking kernel is attractive because of its stability and simplicity, only 400 lines of code. But this size measurement doesn't say how carefully the HOL Light code has been reviewed, and doesn't say anything about the possibility of bugs in the underlying programming language.

Extra code can be good when it's test code. A battery of tests tends to catch more bugs than a single test. Running a proof through multiple proof-checking programs (preferably each in its own isolated environment) can save the day when there's a bug in one program, and is particularly easy if the checkers take the same input language for writing proofs. But it's not clear how effective this is at stopping attacks: for example, sometimes bugs are shared by multiple checkers.

The question "Who watches the provers?" is better answered by a proof saying that a checker works correctly. A close translation of the inference rules in the HOL Light kernel, except for the rules to introduce new definitions, was already proven in 2006 to generate only correct theorems. That proof was also checked by HOL Light. (For readers familiar with logic: of course this assumes a large cardinal; Vω+ω is enough for HOL Light. The same paper also has a variant of the proof that skips the large-cardinal assumption, at the expense of omitting the axiom of infinity from the logic being proven.)

After more work, a clone of HOL Light called Candle was proven in 2022 to allow only proofs of correct theorems, as long as the CPU implements the instructions used in the Candle binary in the expected way. This proof is again computer-checked, this time in another proof-checking system, HOL4. There was also a computer-checked proof in 2022 of the correctness of a standalone proof checker for HOL proofs in OpenTheory format.

From a security perspective, it's still concerning to be relying on large proof-checking binaries, where the answer to why we're supposed to trust one binary is that the binary has supposedly been checked by another large proof-checking binary. I'd like to see more work on simplifying these binaries.

The list

2026-11-30T14:44:13.175398 image/svg+xml Matplotlib v3.10.1+dfsg1, https://matplotlib.org/

The bug links below are accompanied by links labeled πŸ› to the Internet Archive Wayback Machine.

HOL Light (default usage, not Candle). Reported soundness bugs: 19960328πŸ› 20030718πŸ› 20030901πŸ› (3 bugs.)

Mizar (default usage, not mizar-rs). Reported soundness bugs: 20010625πŸ› 20030626πŸ› 20071226πŸ› 20230215πŸ› 20230227πŸ› 20230227-2πŸ› 20230227-3πŸ› (7 bugs.)

Metamath (default usage, not mmverify.py). Reported soundness bugs: 20171231πŸ› 20190211πŸ› 20190909πŸ› 20210621πŸ› 20230801πŸ› 20240708πŸ› 20250620πŸ› 20250727πŸ› 20251122πŸ› (9 bugs.)

Isabelle. Reported soundness bugs: 19930326πŸ› 19931122πŸ› 19960627πŸ› 19990929πŸ› 19991216πŸ› 20000708πŸ› 20030923πŸ› 20040823πŸ› 20060503πŸ› 20060512πŸ› 20140705πŸ› 20150824πŸ› 20161203πŸ› 20260116πŸ› 20260908πŸ› 20260910πŸ› 20261027πŸ› 20261027-2πŸ› 20261105πŸ› 20261125πŸ› (20 bugs.)

Lean 3/Lean 4 (default usage, not nanoda; native_decide excluded). Reported soundness bugs: 20170124πŸ› 20171217πŸ› 20180409πŸ› 20210131πŸ› 20210308πŸ› 20220225πŸ› 20220806πŸ› 20221018πŸ› 20230127πŸ› 20230227πŸ› 20231010πŸ› 20250423πŸ› 20250524πŸ› 20260301πŸ› 20260722πŸ› 20260725πŸ› 20260731πŸ› 20260731-2πŸ› 20260817πŸ› 20260818πŸ› 20260818-2πŸ› 20260819πŸ› 20260920πŸ› (23 bugs.)

HOL98/HOL4 (default usage, not experimental kernel). Reported soundness bugs: 19990603πŸ› 20011205πŸ› 20011221πŸ› 20020305πŸ› 20020523πŸ› 20030113πŸ› 20041025πŸ› 20050426πŸ› 20061011πŸ› 20241014πŸ› 20260301πŸ› 20260301-2πŸ› 20260301-3πŸ› 20260314πŸ› 20260324πŸ› 20260722πŸ› 20260722-2πŸ› 20260722-3πŸ› 20260723πŸ› 20260723-2πŸ› 20260724πŸ› 20260728πŸ› 20260819πŸ› 20261011πŸ› (24 bugs.)

Coq/Rocq (default usage, not coqchk/rocqchk). Reported soundness bugs: 19991208πŸ› 20010601πŸ› 20031028πŸ› 20070209πŸ› 20080514πŸ› 20081202πŸ› 20100210πŸ› 20100922πŸ› 20110726πŸ› 20111005πŸ› 20120209πŸ› 20131212πŸ› 20140115πŸ› 20140227πŸ› 20140410πŸ› 20150324πŸ› 20150630πŸ› 20150715πŸ› 20150906πŸ› 20150906-2πŸ› 20151122πŸ› 20160222πŸ› 20160519πŸ› 20160630πŸ› 20180131πŸ› 20180423πŸ› 20180526πŸ› 20180527πŸ› 20180604πŸ› 20180606πŸ› 20180828πŸ› 20181031πŸ› 20190102πŸ› 20190302πŸ› 20190406πŸ› 20190926πŸ› 20191015πŸ› 20191104πŸ› 20191123πŸ› 20191221πŸ› 20200118πŸ› 20200422πŸ› 20200608πŸ› 20201109πŸ› 20201121πŸ› 20210219πŸ› 20210324πŸ› 20210513πŸ› 20211026πŸ› 20220321πŸ› 20220408πŸ› 20220530πŸ› 20221012πŸ› 20221012-2πŸ› 20221117πŸ› 20221117-2πŸ› 20221124πŸ› 20221207πŸ› 20230719πŸ› 20240116πŸ› 20240206πŸ› 20240719πŸ› 20241121πŸ› 20250328πŸ› 20250403πŸ› 20250423πŸ› 20250423-2πŸ› 20250903πŸ› 20250903-2πŸ› 20260228πŸ› 20260228-2πŸ› 20260228-3πŸ› 20260302πŸ› 20260302-2πŸ› 20260302-3πŸ› 20260302-4πŸ› 20260302-5πŸ› 20260302-6πŸ› 20260302-7πŸ› 20260302-8πŸ› 20260310πŸ› 20260312πŸ› 20260321πŸ› 20260330πŸ› 20260428πŸ› 20260513πŸ› 20260513-2πŸ› 20260716πŸ› 20260819πŸ› 20260820πŸ› 20260820-2πŸ› 20260820-3πŸ› 20260820-4πŸ› 20260820-5πŸ› 20260820-6πŸ› 20260820-7πŸ› 20260820-8πŸ› 20260820-9πŸ› 20260827πŸ› 20260910πŸ› 20260919πŸ› 20261027πŸ› 20261027-2πŸ› 20261030πŸ› 20261104πŸ› 20261109πŸ› 20261109-2πŸ› 20261109-3πŸ› 20261109-4πŸ› 20261110πŸ› 20261126πŸ› (111 bugs.)

More links

200811 Thomas C. Hales "Formal proof": The "Soundness" section starting on page 1375 includes comments on HOL Light's small kernel, formal verification of verifiers, and "nearly independent" verifiers. Also some comments on known bugs: "Experience from other top-tier theorem-proving systems has been that about three to five bugs have been found in each system over a period of 15-20 years of use. After decades of use on many different systems, to my knowledge, only one proof has ever had to be retracted as a result of a bug in a theorem-proving system, and this in a system that I do not rank in the top-tier: in 1995 a heap overflow error led to the false claim that the theorem-prover REVEAL had solved the Robbins conjecture."

2010 Marco D'Ambros and Michele Lanza and Romain Robbes "An Extensive Comparison of Bug Prediction Approaches": example of a paper on quantitative models of bug discovery.

20140401 Jeremy Avigad and John Harrison "Formally verified mathematics": The "Quest for certainty" section starting on page 73 includes comments (shorter than the Hales comments) on small kernels, "independent" verifiers, and formal verification of verifiers; but then says that the question of certainty seems "misplaced" and says that computer-checked proofs provide "a very high degree of confidenceβ€”much higher than any human referee can offer without machine assistance".

20230906 Daniel J. Bernstein "Papers with computer-checked proofs": "As more and more types of proofs are automated, it will become more and more common to rely on the proof assistant for steps that the human has never actually thought through. If there are bugs in proof-checkers, then presumably the automated tools will sometimes accidentally exploit those bugs, as in the case reported in [81, page 289]. The resulting pseudo-proofs have a competitive advantage, since the human wants to believe that the result is proven."

20261029 Jonathan Brossard and Jean-Philippe Aumasson "Hacking the Truth: Forged Lean Proofs and the Risk of Verifier Bugs"

20261114 https://github.com/emberian/common-lisp-compiler-audit: various examples of soundness bugs in another prover, ACL2.

20261123 https://github.com/rocq-prover/rocq/issues/22877: example of a Rocq-related bug that I'm not counting. This bug is in the separate rocqchk checker, not the default Rocq checker. The positioning of rocqchk is as an additional check beyond the default check, giving an "even higher level of security", so it wouldn't make sense to count rocqchk bugs against Rocq. A buffer overflow in rocqchk could end up eliminating security if rocqchk isn't sufficiently isolated, but this bug doesn't look like a buffer overflow.

20261124 https://github.com/leanprover/lean4/issues/16730: example of a Lean-related bug that I'm not counting. This bug is in a separate checker, not the default Lean checker.


Version 20261130 of the "False computer-checked proofs" page.