Visible to the public Scalable Translation Validation of Unverified Legacy OS Code

TitleScalable Translation Validation of Unverified Legacy OS Code
Publication TypeConference Paper
Year of Publication2019
AuthorsTahat, Amer, Joshi, Sarang, Goswami, Pronnoy, Ravindran, Binoy
Conference Name2019 Formal Methods in Computer Aided Design (FMCAD)
Date Publishedoct
KeywordsARM instructions, ARM machines, ARM specification language, ARMv8 ISA, Cognition, composability, compositionality, formal reasoning, formal specification, formal validation, formal verification, functional security properties, Google Zircon, large-scale production operating system, Linux, Linux Operating System Security, Linux OS, Metrics, multiple high-level source languages, Operating systems, operating systems (computers), Predictive Metrics, program verification, pubcrawl, PVS7 theorem prover, radare2 reverse engineering tool, Resiliency, reverse engineering, Scalability, scalable verification, security, Semantics, specification languages, theorem proving, Tools, translation validation, unverified legacy OS code, XML
Abstract

Formally verifying functional and security properties of a large-scale production operating system is highly desirable. However, it is challenging as such OSes are often written in multiple source languages that have no formal semantics - a prerequisite for formal reasoning. To avoid expensive formalization of the semantics of multiple high-level source languages, we present a lightweight and rigorous verification toolchain that verifies OS code at the binary level, targeting ARM machines. To reason about ARM instructions, we first translate the ARM Specification Language that describes the semantics of the ARMv8 ISA into the PVS7 theorem prover and verify the translation. We leverage the radare2 reverse engineering tool to decode ARM binaries into PVS7 and verify the translation. Our translation verification methodology is a lightweight formal validation technique that generates large-scale instruction emulation test lemmas whose proof obligations are automatically discharged. To demonstrate our verification methodology, we apply the technique on two OSes: Google's Zircon and a subset of Linux. We extract a set of 370 functions from these OSes, translate them into PVS7, and verify the correctness of the translation by automatically discharging hundreds of thousands of proof obligations and tests. This took 27.5 person-months to develop.

DOI10.23919/FMCAD.2019.8894252
Citation Keytahat_scalable_2019