论文标题
进行基于标签的政策执行的正式验证的汇编
Towards Formally Verified Compilation of Tag-Based Policy Enforcement
论文作者
论文摘要
硬件辅助参考监视正在受到越来越多的关注,以提高现有软件的安全性。一个示例是管道体系结构扩展程序,该扩展程序连接元数据标签以注册和内存值,并在每个机器指令中执行基于标签的规则以执行软件定义的安全策略。要有效地使用管道,工程师应该能够根据函数,本地变量和结构化控制运算符等源级概念来编写安全策略,这些概念在机器级别不可见。编译器的工作是生成管道感知的机器代码来执行这些来源级别的策略。因此,编译器成为受监视系统可信赖的计算基础的一部分 - 因此是验证的主要候选人。 为了使编译器正确性在此设置中,我们使用其自己的基于用户指定标签的监视形式扩展了源语言语义,并证明编译器保留了监视行为。汇编的挑战包括将源级监视策略映射到指令级标签规则,保留故障停止行为,并满足常规优化的令人惊讶的复杂先决条件。在本文中,我们描述了Tagine的设计和验证,Tagine是一种小型原型编译器,该编译器将简单的标记翻译成标记的寄存器传输语言并执行简单的优化。 Tagine基于Compcert编译器的RTLGEN和DEADCODE阶段,因此在Coq中编写和验证。这项工作是验证全面编译器的第一步,用于现实的标记源语言。
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.