虚假的计算机检查证明
False computer-checked proofs

原始链接: https://cr.yp.to/proofs/falseccp.html

计算机证明检查器可能包含健全性错误,并且已在包括 HOL Light、Mizar、Metamath、Isabelle、Lean、HOL4 和 Coq/Rocq 在内的系统中报告过许多此类错误。像 HOL Light 那样小的可信内核很有吸引力,但仅凭体积并不能保证正确性,尤其在考虑到可能的语言或运行时错误时。通过多个检查器运行证明可能会有帮助,但共享错误会限制其效果。更强的保证来自计算机检查的元定理,这些元定理证明检查器的正确性,例如针对 HOL Light/Candle 和独立 OpenTheory 检查器的结果。然而,依赖由其他大型二进制文件检查的大型二进制文件仍然是一个安全问题;需要做更多工作来简化可信计算基。

该帖讨论了一个页面,它编录了计算机证明检查器中的可靠性错误。评论者指出,虽然错误存在,但要利用它们误导数学家并不容易,因为通常需要多个独立的检查器和非正式审查;一个 DeepMind 示例需要 Lean 和 nanoda 同时存在错误。其他人认为错误数量上升反映了审查加强与 LLM 生成的证明,而 Lean 已通过更难的内核和偏执检查作出回应。有些人将证明检查器比作编译器或借用检查器,强调独立实现和小规模可信内核能降低风险。怀疑者担心 LLM 可能进行奖励黑客或利用错误,尤其在证明未被阅读时,但捍卫者表示意外误用不太可能,且错误会被快速修复。总体而言,形式化证明仍然有用,但需要仔细的规范、多重验证和持续强化。
相关文章

原文
False computer-checked proofs (djb) D. J. Bernstein
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 at 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.

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.

2026-11-25T10:50:32.133543 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🏛

Mizar (default usage, not mizar-rs). Reported soundness bugs: 20010625🏛 20030626🏛 20071226🏛 20230215🏛 20230227🏛 20230227-2🏛 20230227-3🏛

Metamath (default usage, not mmverify.py). Reported soundness bugs: 20171231🏛 20190211🏛 20190909🏛 20210621🏛 20230801🏛 20240708🏛 20250620🏛 20250727🏛 20251121🏛

Isabelle. Reported soundness bugs: 19930326🏛 19931122🏛 19950821🏛 19960627🏛 19991216🏛 20000708🏛 20030923🏛 20040823🏛 20060503🏛 20060512🏛 20140705🏛 20150824🏛 20161203🏛 20260116🏛 20260908🏛 20260910🏛 20261027🏛 20261105🏛

Lean (default usage, not nanoda; native_decide excluded). Reported soundness bugs: 20170124🏛 20171217🏛 20180409🏛 20210131🏛 20210308🏛 20220225🏛 20220806🏛 20221018🏛 20230127🏛 20230227🏛 20231010🏛 20250423🏛 20250524🏛 20260104🏛 20260301🏛 20260722🏛 20260725🏛 20260731🏛 20260731-2🏛 20260818🏛 20260818-2🏛 20260819🏛 20260819-2🏛 20260920🏛 20261124🏛

HOL98/HOL4. Reported soundness bugs: 19990603🏛 20011205🏛 20011221🏛 20020305🏛 20020523🏛 20030113🏛 20030721🏛 20041025🏛 20050426🏛 20061011🏛 20090617🏛 20241014🏛 20260301🏛 20260301-2🏛 20260301-3🏛 20260314🏛 20260324🏛 20260722🏛 20260722-2🏛 20260722-3🏛 20260723🏛 20260723-2🏛 20260724🏛 20260728🏛 20260819🏛 20260819-2🏛 20261011🏛

Coq/Rocq. 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🏛 20200603🏛 20200608🏛 20201109🏛 20201121🏛 20210219🏛 20210324🏛 20210513🏛 20211026🏛 20220321🏛 20220408🏛 20220530🏛 20221012🏛 20221012-2🏛 20221117🏛 20221117-2🏛 20221124🏛 20221207🏛 20230719🏛 20231213🏛 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🏛 20260818🏛 20260819🏛 20260820🏛 20260820-2🏛 20260820-3🏛 20260820-4🏛 20260820-5🏛 20260820-6🏛 20260820-7🏛 20260820-8🏛 20260820-9🏛 20260827🏛 20260909🏛 20260910🏛 20260919🏛 20261021🏛 20261025🏛 20261027🏛 20261027-2🏛 20261030🏛 20261104🏛 20261109🏛 20261109-2🏛 20261109-3🏛 20261109-4🏛 20261110🏛


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

联系我们 contact @ memedata.com