将栈安全性形式化为一种安全属性
Formalizing Stack Safety as a Security Property
AI总结:
本文提出一种基于语言安全概念的栈安全性形式化表征,将其分解为完整性与机密性等五个属性,支持寄存器保存与尾调用消除,并通过随机测试成功区分了微策略的正确与错误实现。
摘要:
术语栈安全性用于描述各种用于保护栈内存的编译器、运行时和硬件机制。与“堆”不同,ISA 级别的栈并不对应于单一的高级语言概念:不同的编译器以不同方式使用它,以支持来自各种语言的过程和函数抽象机制。这种多变的特性使得准确界定正确执行栈安全性的含义变得困难。我们提出了一种使用基于语言的安全概念对栈安全性进行新的形式化表征。我们没有将栈安全性视为一个单一的属性,而是将其分解为针对调用者和被调用者各自的完整性和机密性属性,外加一个控制流属性:共计五个属性。这一表述是由一类特定的执行机制所推动的,即 Roessler 和 DeHon 研究的“惰性”栈安全微策略,这些策略允许函数写入彼此的栈帧,但对被修改的位置进行污染,使得栈帧的所有者无法访问它们。现有的栈安全性表征均无法捕捉这种安全风格;我们通过基于系统的可观察行为来陈述我们的属性,从而在此捕捉了这种风格。我们的属性超越了先前的栈安全形式化定义,支持调用者保存和被调用者保存的寄存器、在栈上传递的参数以及尾调用消除。我们通过使用这些属性来区分 Roessler 和 DeHon 微策略的正确与错误实现,从而验证了这些属性,该验证采用了基于属性的随机测试。我们的测试工具成功识别了几个损坏的变体,包括 Roessler 和 DeHon 的惰性策略;其修复版本通过了我们的测试。
英文摘要:
The term stack safety is used to describe a variety of compiler, run-time, and hardware mechanisms for protecting stack memory. Unlike "the heap," the ISA-level stack does not correspond to a single high-level language concept: different compilers use it in different ways to support procedural and functional abstraction mechanisms from a wide range of languages. This protean nature makes it difficult to nail down what it means to correctly enforce stack safety. We propose a new formal characterization of stack safety using concepts from language-based security. Rather than treating stack safety as a monolithic property, we decompose it into an integrity property and a confidentiality property for each of the caller and the callee, plus a control-flow property: five properties in all. This formulation is motivated by a particular class of enforcement mechanisms, the "lazy" stack safety micro-policies studied by Roessler and DeHon, which permit functions to write into one another's frames but taint the changed locations so that the frame's owner cannot access them. No existing characterization of stack safety captures this style of safety; we capture it here by stating our properties in terms of the observable behavior of the system. Our properties go further than previous formal definitions of stack safety, supporting caller- and callee-saved registers, arguments passed on the stack, and tail-call elimination. We validate the properties by using them to distinguish between correct and incorrect implementations of Roessler and DeHon's micro-policies using property-based random testing. Our test harness successfully identifies several broken variants, including Roessler and DeHon's lazy policy; a repaired version of their policy passes our tests.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。