BACK_TO_FEEDAICRIER_2
Lean-zip bug exposes formal verification gaps
OPEN_SOURCE ↗
HN · HACKER_NEWS// 21h agoSECURITY INCIDENT

Lean-zip bug exposes formal verification gaps

Lean-zip, a formally verified zlib implementation in Lean 4, was found to have a heap buffer overflow and DoS vulnerability. The failures stem from unverified components and a critical integer overflow bug in the Lean 4 runtime's memory allocation.

// ANALYSIS

The discovery of vulnerabilities in a "proven correct" program is a sobering reminder that formal verification is only as strong as its specification and the underlying runtime.

  • A heap buffer overflow was found in the Lean 4 runtime (TCB), an area typically assumed to be correct by formal proofs
  • An archive parser bug caused a DoS due to a specification gap where the parser logic wasn't covered by any theorems
  • Fuzzing tools like AFL++ and AddressSanitizer remain essential, even for code with mathematical proofs of correctness
  • The incident underscores that "correctness" in formal methods is relative to the model, not the absolute reality of execution
// TAGS
lean-zipleanformal-verificationtestingsafetyreasoningopen-source

DISCOVERED

21h ago

2026-04-14

PUBLISHED

1d ago

2026-04-14

RELEVANCE

8/ 10

AUTHOR

bumbledraven