Lean Bugs

A corpus of bugs in the Lean theorem prover, with an emphasis on the ones that matter for trust: proofs of False, statements that don't say what their source says, and checkers that can be fooled.

LLVM and GCC have bug-study datasets, and Rocq keeps a regression file per reported bug plus a curated list of critical soundness bugs. Lean has an issue tracker, a few checkers that can be run against each other, and scattered Zulip threads. This site collects the bugs in one place, each one classified by which guarantee of the trusted pipeline it breaks, how it got in, and which checkers it gets past.

Entries live as JSON files in the bugs/ directory of the repository. To add or correct one, open a pull request; the site build checks every entry against the schema.

Bugs (26)

IDBugGuarantee brokenStatus
lean-0001Kernel accepts wrong-structure projections, allowing an axiom-free proof of False
kernel-soundness
fixed
lean-0002Kernel is_def_eq cache depended on the order of checks
kernel-soundness
fixed
lean-0003String.Pos.Raw.extract: logical model and compiled code disagree
compiler-soundness
fixed
lean-0004Kernel infer_let ignores dependencies in let-binding types—fixed
lean-0005Substring comparison is not reflexive on malformed UTF-8—fixed
lean-0006Kernel did not recognize sorts as Prop up to universe normalization
kernel-soundness
fixed
lean-0007Declarations could use the kernel's _nested auxiliary type names
kernel-soundness
fixed
lean-0008Kernel is_prop check did not require a sort
kernel-soundness
fixed
lean-0009Reference count overflow corrupted runtime objects
compiler-soundness
fixed
lean-0010Linux release builds linked GMP 6.1.2, which has an exploitable bug
compiler-soundness
fixed
lean-0011Missing metavariable and free-variable checks in inductive.cpp—fixed
lean-0012Universe parameters not checked in mutual definitions—fixed
lean-0013Exported stubs of partial definitions were not marked unsafe—fixed
lean-0014Kernel rejected a valid inductive predicate (universe normalization)
kernel-completeness
fixed
lean-0015Kernel did not bound the size of Nat numerals it computes—fixed
lean-0016Kernel allowed `.2` projection of an existential's proof component
kernel-soundness
fixed
lean-0017`lean_nat_mod` returned a wrong value at the small/big-nat boundary
kernel-soundness
fixed
lean-0018Universe-level offset dropped in `IMax` normalization
kernel-soundness
fixed
lean-0019`safe` definitions could reference `partial` ones
kernel-soundness
fixed
lean-0020Kernel accepted self-referential indices in inductive types
kernel-soundness
fixed
lean-0021`reduceBool` / `native_decide` axiom leakage
compiler-soundnessreporting-faithfulness
fixed
lean-0022Kernel treated constants as `Nat` literals when reducing `Nat.pow`
kernel-soundness
fixed
lean-0023`Expr.Data` and `Level.Data` were not conservative on extreme-depth expressions
kernel-soundness
fixed
lean-0024Buffer overflow in `lean_io_prim_handle_read`—fixed
lean-0025Missing kernel check for free variables in `opaque` declarations
kernel-soundness
fixed
lean-0026Kernel grants large elimination to a Prop inductive through a dishonest autoParam, allowing an axiom-free proof of False
kernel-soundness
open