NewsCrawler.org

Formal verification of popular Rust OSS in Lean 4 found real security bugs

著名な製OSSをLean 4で形式検証してみたら、めちゃめちゃバグが見つかった話
Image: zenn.dev

The author, a PhD student at Columbia University, is building h5i, a framework for formal verification[1] of Rust web apps built on Axum. Key logic is converted to Lean 4 so that its properties can be proven mathematically, and h5i has passed 900 GitHub stars. To test whether the approach works on real projects, the author started h5i-app-bench, which ports well-known open-source Axum-based Rust apps to h5i and checks whether their correctness can be proven.

Where proofs failed, the author found bugs in the original Rust code, including deletion of other users' data, information leaks and infinite loops that cause denial of service (DoS)[2]. In RustiCal, a CalDAV/CardDAV[3] server, deleting an event used an SQL query whose WHERE clause did not include the owner ID (principal), so Alice deleting her own event could also delete Bob's event with the same calendar and object IDs. In OxiCloud, adding a file to a music playlist checked edit rights to the playlist but not read rights to the file, so a user could reference another user's private file and get its name, size, MIME type and audio metadata; the fix is in PR #796. In RustFS, an S3-compatible[4] object storage, the iteration limit for variable expansion in access policies applied only to the outer loop, and a very small input caused more than 100,000 calls.

The author notes that a failed proof does not always mean a bug, since the proof may be incomplete, the model may be wrong, or the conversion from Rust may not support some language features. The author also says that AI coding agents such as Claude Code and Codex generate code quickly, so checking what that code actually guarantees is becoming important.

Repository OxiCloud github.com

Self-hosted cloud storage written in Rust for files, photos, calendars and contacts, with CalDAV and CardDAV support.

Stars: 3,739Forks: 196License: MITUpdated:

Read the original zenn.dev

Sources

  • Zenn JA

    著名な製OSSをLean 4で形式検証してみたら、めちゃめちゃバグが見つかった話

    12 likes2 bookmarks0 comments

Published: First seen: Читать по-русски

Open as a page