A “proof” of Fermat’s Last Theorem that fits the margin
A bug in Lean's String.Pos.Raw.extract let a bogus "proof" of Fermat's Last Theorem typecheck. For a one-byte slice at a huge position, the logical definition returns the empty string while compiled native code returns the whole string. Combining ordinary evaluation with native_decide yields a contradiction, from which anything follows. The flaw is not a kernel soundness issue: it works because native_decide adds the compiler to the trusted base. It affects Lean up to 4.33.1 and is fixed in v4.34.0-rc1, and the practical lesson is to run #print axioms on external proofs and treat native_decide axioms with suspicion.
Related posts
- Auditing in the age of (good enough) AI
Trail of Bits hardMasterBefore auditing the Miden zero-knowledge VM, Trail of Bits spent six months using Claude and Codex agents to build tooling for its custom stack-based assembly language (MASM): an LSP server, a decompiler with a reusable IR, an abstract-interpretation static analysis engine, and a Lean model of the VM executor. The analyses flagged 400+ locations with missing type validation and a high-severity bug where an unvalidated prover-supplied remainder in mod_12289 would let a malicious prover forge Falcon signatures and drain accounts. Agents also produced 95 machine-checked Lean correctness proofs covering the core library's binary arithmetic, uncovering edge-case bugs in rotr and wrapping_mul. The broader point is that capable agents make exploratory, hard-to-justify tooling projects cheap enough to pursue routinely.
- Announcing Rust 1.99.1
Rust Blog mediumAdept
Rust 1.99.1 is a point release fixing three regressions. LLVM's loop-idiom-wcslen pass could emit calls to `wcslen` on targets lacking it, breaking UEFI builds using `std`, so compiler-builtins now provides a fallback. FFI functions returning `bool` on x86_64 could leave bits 1-7 of the return register unspecified; the return type is again marked for zero-extension as the ABI requires. `rust-lld` on macOS could fail to load libLLVM when invoked without the rustup proxy and now carries an rpath entry for libLLVM.dylib.
- Kimina-Prover-RL
Hugging Face hardMasterKimina-Prover-RL is an open-source GRPO training pipeline, released as a recipe in a fork of verl, that teaches small LLMs to prove Lean 4 theorems using a think-then-code output format. The pipeline verifies proofs with kimina-lean-server, applies strict format-checking rewards and adds a single error-correction turn that feeds Lean feedback back to the model. It uses DrGRPO to remove the length bias of GRPO and trains on a filtered set of hard NuminaMath-LEAN problems. After 48 hours on 8 H100s the 1.7B model reaches 76.23% Pass@32 on MiniF2F (77.87% with error fixing), and a 0.6B model reaches 71.30%, both state of the art for open-source models of their size.
- Using Hermes’s Quicksort to run Doom: A tale of JavaScript exploitation
Meta Engineering hardMasterA fuzzer-found bug in Hermes's stable Quicksort let a comparator callback grow the array during Array.prototype.sort, so the fixed-size index vector was read out of bounds. Meta's security team escalated it to arbitrary read/write. They underflowed the unsigned j index to swap values outside the vector, groomed adjacent mmap'd ArrayBuffer allocations, and corrupted a malloc chunk size to get overlapping buffers. They then reclaimed one buffer as a GenGC heap segment so ArrayBuffer data pointers could be overwritten. The escalation raised the bounty from a typical $500–$3,000 to $12,000, and the exploit was demonstrated by running Doom inside Hermes.
- Hakana: Taking Hack Seriously
Slack Engineering mediumAdeptSlack has open-sourced Hakana, a Rust-based type checker and static analyzer for Hack, built on Psalm's design and reusing the Hack parser bundled with HHVM. Slack runs it in CI to catch unused code, impossible or redundant type checks, misuse of internal APIs, and security flaws. Security checks use interprocedural taint analysis similar to Facebook's internal Zoncolan, plus a literal-string type that blocks SQL injection at function boundaries. Plugin hooks support custom type inference and fast codebase-wide migrations, and on Slack's roughly 5 million lines it runs about 5x faster than Psalm and on par with the official Hack typechecker.