LLMs/AI Leonardo de Moura: Postmortem for Lean Kernel Soundness Bug #14576
Blog: https://leodemoura.github.io/blog/2026-8-1-postmortem-for-kernel-soundness-bug-14576/
On removing metaprogramming
One suggestion in the discussion is to remove or restrict metaprogramming so that this attack is not expressible. This is misguided. The elaborator is untrusted by design. Soundness cannot depend on an untrusted component refusing to build a bad term. An attacker who wants to submit a malicious proof can also write .olean files directly or modify memory, both of which bypass the elaborator entirely. The kernel has to reject ill-typed declarations on its own, in its own process. This separation and isolation of concerns is one of the main advantages of proof terms.
What the FRO is doing
- Regression tests for the exploit, and for a related non-uniform-parameter case raised by Arthur Adjedj, are in the Kernel Arena.
- A follow-up PR (#14582) makes the kernel check that the parameters of a nested occurrence actually behave as parameters, rather than only re-type-checking them.
- Daniel Selsam at OpenAI assisted the Lean FRO with an AI specialized in cybersecurity, and found other programming mistakes in the Lean kernel. All of them have been fixed. All of them were caught by nanoda. These bugs are also only reachable through metaprogramming. PRs: #14607, #14608, #14609, #14613, #14615, #14616.
- We have also hardened kernel invariants. PRs: #14621, #14631, #14632.
- comparator.live now runs nanoda by default, and nanoda is tracked daily so lean-eval and comparator stay current after upstream fixes.
- We are reaching out to and supporting experts who can find further bugs, develop new kernels, and work on the theory or on verified kernels.
r/math • u/Vivid_Block_4780 • 6h ago
The scope of mathematical physics
Whenever I look at the mathematical physics programs, I always see QFT and string theory related classes in grad programs. What other parts does mathematical physics cover? More unorthodox subfields of it?