Forward Symbolic Execution for Trustworthy Automation of Binary Code Verification

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Lindner, Andreas, Palmskog, Karl, Constable, Scott, Dam, Mads, Guanciale, Roberto, Nemati, Hamed
Format: Preprint
Publié: 2023
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866912821666643968
author Lindner, Andreas
Palmskog, Karl
Constable, Scott
Dam, Mads
Guanciale, Roberto
Nemati, Hamed
author_facet Lindner, Andreas
Palmskog, Karl
Constable, Scott
Dam, Mads
Guanciale, Roberto
Nemati, Hamed
contents Control flow in unstructured programs can be complex and dynamic, which makes static analysis difficult. Yet, automated reasoning about unstructured control flow is important when certifying properties of binary (machine) code in trustworthy systems, e.g., cryptographic routines. We present a theory of forward symbolic execution for unstructured programs suitable for use in theorem provers that enables automated verification of both functional and non-functional program properties. The theory's foundation is a set of inference rules where each member corresponds to an operation in a symbolic execution engine. The rules are designed to give control over the tradeoff between the preservation of precision and introduction of overapproximation. We instantiate our theory for BIR, a previously proposed intermediate language for binary analysis. We demonstrate how symbolic executors can be constructed for BIR with common optimizations such as pruning of infeasible symbolic states. We implemented our theory in the HOL4 theorem prover using the HolBA binary analysis library, obtaining machine-checked proofs of soundness of symbolic execution for BIR. We practically evaluated two applications of our theory: verification of functional properties of RISC-V binaries and verification of execution time bounds of programs running on the ARM Cortex-M0 processor. The evaluation shows that such verification can be automated with moderate overhead on medium-sized programs.
format Preprint
id arxiv_https___arxiv_org_abs_2304_08848
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Forward Symbolic Execution for Trustworthy Automation of Binary Code Verification
Lindner, Andreas
Palmskog, Karl
Constable, Scott
Dam, Mads
Guanciale, Roberto
Nemati, Hamed
Programming Languages
Cryptography and Security
Logic in Computer Science
Control flow in unstructured programs can be complex and dynamic, which makes static analysis difficult. Yet, automated reasoning about unstructured control flow is important when certifying properties of binary (machine) code in trustworthy systems, e.g., cryptographic routines. We present a theory of forward symbolic execution for unstructured programs suitable for use in theorem provers that enables automated verification of both functional and non-functional program properties. The theory's foundation is a set of inference rules where each member corresponds to an operation in a symbolic execution engine. The rules are designed to give control over the tradeoff between the preservation of precision and introduction of overapproximation. We instantiate our theory for BIR, a previously proposed intermediate language for binary analysis. We demonstrate how symbolic executors can be constructed for BIR with common optimizations such as pruning of infeasible symbolic states. We implemented our theory in the HOL4 theorem prover using the HolBA binary analysis library, obtaining machine-checked proofs of soundness of symbolic execution for BIR. We practically evaluated two applications of our theory: verification of functional properties of RISC-V binaries and verification of execution time bounds of programs running on the ARM Cortex-M0 processor. The evaluation shows that such verification can be automated with moderate overhead on medium-sized programs.
title Forward Symbolic Execution for Trustworthy Automation of Binary Code Verification
topic Programming Languages
Cryptography and Security
Logic in Computer Science
url https://arxiv.org/abs/2304.08848