The term stack safety is used for 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 formal characterization of stack safety using concepts from language-based security. Rather than packaging all aspects of stack safety into 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~\cite{DBLP:conf/sp/RoesslerD18}, which permit functions to write into one another's frames, but which taint the changed locations so that the frame's owner cannot access it. 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 our 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 does pass our tests.


翻译:“栈安全性”这一术语用于描述一系列保护栈内存的编译器、运行时及硬件机制。与“堆”不同,指令集架构(ISA)层面的栈并不对应单一高级语言概念:不同编译器以不同方式利用它来支持多种语言中的过程式与函数式抽象机制。这种多变性使得准确定义栈安全性的正确实施变得困难。我们提出了一种基于语言安全概念的栈安全性形式化表征。我们并未将栈安全性的所有方面打包为一个单一属性,而是将其分解为:调用者与被调用者各自的完整性属性与机密性属性,再加上一个控制流属性——共计五种属性。这一构建源于Roessler与DeHon(引用自DBLP:conf/sp/RoesslerD18)研究的特定类别的实施机制——“惰性”栈安全微策略,该机制允许函数写入对方的栈帧,但会对所修改的位置进行污染,使得帧所有者无法再访问这些位置。现有的栈安全性表征均未捕捉到这种安全风格。我们通过基于系统可观察行为来表述属性,在此予以捕捉。我们的属性超越了以往栈安全性的形式化定义,支持调用者保存与被调用者保存寄存器、通过栈传递的参数以及尾调用消除。我们通过基于属性的随机测试,利用这些属性来区分Roessler与DeHon微策略的正确与错误实现,从而验证了这些属性。我们的测试框架成功识别出多个有缺陷的变体,包括Roessler与DeHon的惰性策略;而修复后的策略版本则通过了我们的测试。

0
下载
关闭预览

相关内容

Linux导论,Introduction to Linux,96页ppt
专知会员服务
82+阅读 · 2020年7月26日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
106+阅读 · 2019年10月9日
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
全球首个GNN为主的AI创业公司,募资$18.5 million!
图与推荐
1+阅读 · 2022年4月16日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
LibRec 精选:基于LSTM的序列推荐实现(PyTorch)
LibRec智能推荐
50+阅读 · 2018年8月27日
【推荐】用Python/OpenCV实现增强现实
机器学习研究会
15+阅读 · 2017年11月16日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Arxiv
13+阅读 · 2021年5月25日
Directions for Explainable Knowledge-Enabled Systems
Arxiv
26+阅读 · 2020年3月17日
Arxiv
14+阅读 · 2019年9月11日
VIP会员
最新内容
《基于强化学习的自动化红队测试》
专知会员服务
3+阅读 · 7月23日
伊朗不对称防空战略的演进
专知会员服务
4+阅读 · 7月23日
对抗环境下超视距目标打击的情报支援
专知会员服务
10+阅读 · 7月22日
《无人机对海面作战影响评估》
专知会员服务
15+阅读 · 7月21日
印度精确打击与指挥架构的断层
专知会员服务
7+阅读 · 7月20日
相关资讯
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
全球首个GNN为主的AI创业公司,募资$18.5 million!
图与推荐
1+阅读 · 2022年4月16日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
LibRec 精选:基于LSTM的序列推荐实现(PyTorch)
LibRec智能推荐
50+阅读 · 2018年8月27日
【推荐】用Python/OpenCV实现增强现实
机器学习研究会
15+阅读 · 2017年11月16日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员