Automata-Based Software Model Checking of Hyperproperties

Bernd Finkbeiner, Hadar Frenkel, Jana Hofmann, Janine Lohse · DOI

Introduction

Traditional formal verification has long focused on trace properties—assertions that can be checked against a single execution of a program, such as "the program never crashes" or "a specific variable eventually reaches a target value." However, many critical security and privacy policies, known as hyperproperties, cannot be expressed this way. Hyperproperties describe relationships between multiple executions. A classic example is Noninterference, which dictates that changes to secret inputs should not be observable in public outputs across any pair of executions.

While logics like HyperLTL have been developed to specify these properties, they are primarily tailored for finite-state systems like hardware circuits. Software verification presents a significantly greater challenge due to infinite data domains (e.g., integers and strings) and complex control flow. Existing software verification tools for hyperproperties are largely restricted to "universal" properties (e.g., "for all pairs of traces..."). They often fail when faced with quantifier alternation, such as "for every trace $\pi$, there exists a trace $\pi'$ such that...", which is essential for expressing generalized noninterference or program refinement.

HyperTSL(T): A Logic for Software Hyperproperties

To address these challenges, this research introduces HyperTSL(T), an extension of Temporal Stream Logic (TSL) that incorporates interpreted theories. TSL is unique because it separates control flow from data logic, allowing the verification process to reason about actual program operations (like x = y + 1) using SMT solvers rather than treating them as abstract symbols.

By extending TSL to handle hyperproperties and interpreted theories, the authors provide a framework capable of reasoning about complex security policies in programs with infinite data domains. This logic allows for the formal specification of properties that require both temporal reasoning and data-dependent conditions across multiple program executions.

The Verification Algorithm

The proposed method bridges the gap between high-level logic and low-level program execution through several key components:

1. Symbolic Program Automata and Self-Composition

The program is modeled as a Symbolic Büchi Automaton, where transitions are labeled with program statements, including assignments and assertions. To reason about multiple traces simultaneously, the algorithm employs self-composition. This technique effectively runs multiple instances of the program in parallel within a single symbolic framework, allowing the logic to compare variables across different execution paths.

2. Handling Infeasibility

A significant hurdle in software model checking is the presence of "infeasible" paths—sequences of statements in a control-flow graph that are mathematically impossible to execute. To ensure the tool does not report false bugs based on these paths, the authors utilize two pruning techniques:

  • $k$-infeasibility: Local contradictions within a fixed number of steps ($k$) are detected using SMT solvers.
  • Infeasible Accepting Cycles: To handle liveness properties and infinite executions, the algorithm uses ranking functions to identify loops that cannot actually complete an infinite number of iterations, thereby detecting termination or liveness violations.

3. The $\forall^* \exists^*$ Algorithm

The core of the contribution is an algorithm designed to handle the $\forall^* \exists^*$ fragment of HyperTSL(T). To disprove a property like $\forall \pi \exists \pi' . \psi$, the algorithm:

  1. Constructs a product automaton of the program and the specification.
  2. "Projects" this automaton onto the universal trace variables to create an over-approximation of all traces $\pi$ that possess a matching $\pi'$.
  3. Checks if any feasible program trace $\pi$ exists outside of this set. If such a trace is found, it serves as a concrete counterexample to the property.

Evaluation and Key Results

The algorithm was evaluated using targeted examples designed to test its unique capabilities:

  • Generalized Noninterference: The tool successfully identified counterexamples in non-deterministic systems where high-security inputs could be inferred by observing low-security outputs. Previous methods limited to universal properties would have missed these vulnerabilities.
  • Loop-based Counterexamples: In cases where local $k$-step checks were insufficient, the "Infeasible Accepting Cycle" analysis proved essential in identifying bugs that only manifest through complex loop behavior.

The results demonstrate that this approach is the first software model checking algorithm for temporal hyperproperties with quantifier alternations that avoids the limitations of finite-state abstraction.

Limitations and Future Outlook

While the method is sound—meaning any counterexample found is a genuine bug—it is necessarily incomplete due to the undecidability of the halting problem and the infinite nature of the data domains. The effectiveness of the tool is closely tied to the power of the underlying SMT solvers (e.g., Z3) and the ranking function synthesizers.

Future research directions include:

  • Asynchronicity: Developing methods to handle asynchronous hyperproperties where different execution traces progress at different speeds.
  • Scalability: Moving from manual demonstrations and theoretical proofs to a fully automated, high-performance implementation capable of handling large-scale industrial software.

Summary updated

BibTeX
@inproceedings{finkbeiner2023automata,
  author = {Bernd Finkbeiner and Hadar Frenkel and Jana Hofmann and Janine Lohse},
  title = {{Automata-Based Software Model Checking of Hyperproperties}},
  booktitle = {NFM},
  year = {2023},
  url = {https://openreview.net/forum?id=6ualrQzIXh},
}
Figure