D. J. Bernstein整理證明檢查程式的可靠性漏洞
False computer-checked proofs
證明檢查程式會逐步確認一份證明是否成立,但程式本身出錯時,錯誤的結論也可能混過檢查。
- D. J. Bernstein整理多種程式曾被回報的可靠性漏洞,並提醒有些漏洞已被證明能用來騙過檢查。
- 這份清單不包括會誤導使用者的介面漏洞。他也建議用多套檢查程式互相核對,最好各自在隔離環境中執行,但不同程式有時會有相同漏洞,因此仍須設法讓受信任的檢查程式更小、更容易審查。
AI 伴隨問答
針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:
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.
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
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.