PHP 5.0.0 engine reimplemented in safe Rust with a formal proof
Original title: A Star is Reborn: The PHP Interpreter Rewritten in Safe Rust
The port matches C on functionality tests, covers 173 collected memory bugs, and averages 15% runtime overhead.
Researchers reimplemented the PHP 5.0.0 engine in safe Rust and define logical memory safety with an abstract PHP machine. For a core fragment, they prove the Rust translation refines that machine. The port handles all 173 memory vulnerabilities they collected for PHP 5.0.0 and matches the C implementation on functionality tests and evaluated applications.
- Logical memory safety limits operations to permitted memory, beyond native memory safety.
- The formal proof covers a core fragment of PHP, not the full language.
- Rust outputs matched C on the real-world PHP applications evaluated.
- Average runtime overhead versus the C interpreter is 15%.
From the original article
1 min read at arxiv.orgPHP powers most of the web, yet its C interpreter has had many memory-safety vulnerabilities. Reimplementing the interpreter in safe Rust offers a promising way to eliminate these vulnerabilities. However, eliminating native memory violations alone does not necessarily prevent unintended accesses to the logical memory of the translated program.
By Tianyu Li · arxiv.org
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.