What does "stack safety" mean? The phrase is associated with a variety of compiler, run-time, and hardware mechanisms for protecting stack memory, but these mechanisms typically lack precise specifications, relying instead on informal descriptions and examples of the bad behaviors that they prevent. We propose a generic, formal characterization of stack safety based on concepts from language-based security: a combination of an integrity property ("the private state in each caller's stack frame is held invariant by the callee"), and a confidentiality property ("the callee's behavior is insensitive to the caller's private state"), plus an optional control-flow property. We use these properties to validate the stack safety micro-policies proposed by Roessler and DeHon [2018]. Specifically, we check (with property-based random testing) that their "eager" micro-policy, which catches violations early, enforces a simple "stepwise" variant of our properties, and that (a repaired version of) their more performant "lazy" micro-policy enforces a slightly weaker and more extensional observational property. Meanwhile our testing successfully detects violations in several broken variants, including Roessler and DeHon's original lazy policy.
翻译:“ 堆叠安全” 是指什么? 短语与各种编译者、 运行时间和硬件机制相关, 以保护堆叠记忆。 但这些机制通常缺乏精确的规格, 但它们通常缺乏精确的控制流程属性。 我们使用这些属性来验证罗斯勒和德洪( 2018年) 提出的堆叠安全微观政策。 具体地说, 我们用基于财产的随机测试) 来检查他们的“ 戒备” 微观政策, 以早期抓住违规现象, 强制实施我们财产的简单“ 步调” 变式, 以及( 修正版) 其性能更强的“ 懒惰” 微观政策, 以及一个稍弱、 更扩展的观察属性。 同时, 我们用这些属性来验证罗斯勒和德洪( 2018年) 提出的堆堆安全微观政策。 具体地说, 我们用基于财产的随机测试, 检查他们的“ 戒备” 微观政策( ), 早期抓住违规现象, 强制实施一个简单的“ ” 变式的“ ” 变式,, 和 ( 变式) ( 变式) 更精化的) 微版) 其性“ 微的“ 微的“ 微” 微” 微的“ 微” 微” 执行的“ 执行者” 执行者” 执行者”, 执行的“, 实施较弱的“ 等的“ 。