Towards Formally Verified Compilation of Tag-Based Policy Enforcement

12/18/2020
by   CHR Chhak, et al.
0

Hardware-assisted reference monitoring is receiving increasing attention as a way to improve the security of existing software. One example is the PIPE architecture extension, which attaches metadata tags to register and memory values and executes tag-based rules at each machine instruction to enforce a software-defined security policy. To use PIPE effectively, engineers should be able to write security policies in terms of source-level concepts like functions, local variables, and structured control operators, which are not visible at machine level. It is the job of the compiler to generate PIPE-aware machine code that enforces these source-level policies. The compiler thus becomes part of the monitored system's trusted computing base – and hence a prime candidate for verification. To formalize compiler correctness in this setting, we extend the source language semantics with its own form of user-specified tag-based monitoring, and show that the compiler preserves that monitoring behavior. The challenges of compilation include mapping source-level monitoring policies to instruction-level tag rules, preserving fail-stop behaviors, and satisfying the surprisingly complex preconditions for conventional optimizations. In this paper, we describe the design and verification of Tagine, a small prototype compiler that translates a simple tagged WHILE language to a tagged register transfer language and performs simple optimizations. Tagine is based on the RTLgen and Deadcode phases of the CompCert compiler, and hence is written and verified in Coq. This work is a first step toward verification of a full-scale compiler for a realistic tagged source language.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/25/2022

The Trusted Computing Base of the CompCert Verified Compiler

CompCert is the first realistic formally verified compiler: it provides ...
research
03/01/2022

Specialized Accelerators and Compiler Flows: Replacing Accelerator APIs with a Formal Software/Hardware Interface

Specialized accelerators are increasingly used to meet the power-perform...
research
08/23/2019

Contract-based verification of a realistic quantum compiler

In this paper, we present CertiQ, a mostly-automated verification framew...
research
07/01/2019

Verifying that a compiler preserves concurrent value-dependent information-flow security

It is common to prove by reasoning over source code that programs do not...
research
02/02/2018

When Good Components Go Bad: Formally Secure Compilation Despite Dynamic Compromise

We propose a new formal criterion for secure compilation, giving strong ...
research
10/19/2017

Formally Secure Compilation of Unsafe Low-Level Components (Extended Abstract)

We propose a new formal criterion for secure compilation, providing stro...
research
10/27/2020

Verified Secure Compilation for Mixed-Sensitivity Concurrent Programs

Proving only over source code that programs do not leak sensitive data l...

Please sign up or login with your details

Forgot password? Click here to reset