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.
翻译:作为改善现有软件安全的一种方式,硬件辅助参考监测正日益受到越来越多的关注。例如PIPE架构扩展,该架构扩展将元数据标记附加在登记和存储值上,并在每部机器指令中执行基于标签的规则,以强制执行软件定义的安全政策。为了有效地使用PIPE,工程师应该能够根据源级概念,如功能、本地变量和结构化控制操作器等在机器一级无法见的功能、本地变量和结构化控制操作器等,制定安全政策,这是编译者的工作,它生成了现实的PIPE认知机器代码,以强制实施这些源级政策。因此,编译者成为了受监测系统信任的计算基础的一部分,因此成为了核查的主要候选者。为了正式确定该设置的编译者正确性,我们扩展了源语言语的语系,以用户指定的基于标签的监测方式监测,显示编译者保留了这种监测行为。编译工作的挑战包括绘制源级监测政策,以指导级规则,保存故障源源,以及满足常规调整的复杂先决条件。在本文上,我们描述用于标记和校订的简单语言校程的校订和校订的校订的校订阶段,这是一个基于标准的校订和校订的校订的校程的校订的校订。