Language-independent sandboxing of just-in-time compilation and self-modifying code

Jason Ansel, Petr Marchenko, Ú. Erlingsson, Elijah Taylor, Brad Chen, Derek L. Schuff, D. Sehr, Cliff Biffle, Bennet S. Yee
{"title":"Language-independent sandboxing of just-in-time compilation and self-modifying code","authors":"Jason Ansel, Petr Marchenko, Ú. Erlingsson, Elijah Taylor, Brad Chen, Derek L. Schuff, D. Sehr, Cliff Biffle, Bennet S. Yee","doi":"10.1145/1993498.1993540","DOIUrl":null,"url":null,"abstract":"When dealing with dynamic, untrusted content, such as on the Web, software behavior must be sandboxed, typically through use of a language like JavaScript. However, even for such specially-designed languages, it is difficult to ensure the safety of highly-optimized, dynamic language runtimes which, for efficiency, rely on advanced techniques such as Just-In-Time (JIT) compilation, large libraries of native-code support routines, and intricate mechanisms for multi-threading and garbage collection. Each new runtime provides a new potential attack surface and this security risk raises a barrier to the adoption of new languages for creating untrusted content.\n Removing this limitation, this paper introduces general mechanisms for safely and efficiently sandboxing software, such as dynamic language runtimes, that make use of advanced, low-level techniques like runtime code modification. Our language-independent sandboxing builds on Software-based Fault Isolation (SFI), a traditionally static technique. We provide a more flexible form of SFI by adding new constraints and mechanisms that allow safety to be guaranteed despite runtime code modifications.\n We have added our extensions to both the x86-32 and x86-64 variants of a production-quality, SFI-based sandboxing platform; on those two architectures SFI mechanisms face different challenges. We have also ported two representative language platforms to our extended sandbox: the Mono common language runtime and the V8 JavaScript engine. In detailed evaluations, we find that sandboxing slowdown varies between different benchmarks, languages, and hardware platforms. Overheads are generally moderate and they are close to zero for some important benchmark/platform combinations.","PeriodicalId":115691,"journal":{"name":"ACM-SIGPLAN Symposium on Programming Language Design and Implementation","volume":"81 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2011-06-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"99","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM-SIGPLAN Symposium on Programming Language Design and Implementation","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1993498.1993540","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 99

Abstract

When dealing with dynamic, untrusted content, such as on the Web, software behavior must be sandboxed, typically through use of a language like JavaScript. However, even for such specially-designed languages, it is difficult to ensure the safety of highly-optimized, dynamic language runtimes which, for efficiency, rely on advanced techniques such as Just-In-Time (JIT) compilation, large libraries of native-code support routines, and intricate mechanisms for multi-threading and garbage collection. Each new runtime provides a new potential attack surface and this security risk raises a barrier to the adoption of new languages for creating untrusted content. Removing this limitation, this paper introduces general mechanisms for safely and efficiently sandboxing software, such as dynamic language runtimes, that make use of advanced, low-level techniques like runtime code modification. Our language-independent sandboxing builds on Software-based Fault Isolation (SFI), a traditionally static technique. We provide a more flexible form of SFI by adding new constraints and mechanisms that allow safety to be guaranteed despite runtime code modifications. We have added our extensions to both the x86-32 and x86-64 variants of a production-quality, SFI-based sandboxing platform; on those two architectures SFI mechanisms face different challenges. We have also ported two representative language platforms to our extended sandbox: the Mono common language runtime and the V8 JavaScript engine. In detailed evaluations, we find that sandboxing slowdown varies between different benchmarks, languages, and hardware platforms. Overheads are generally moderate and they are close to zero for some important benchmark/platform combinations.
即时编译和自修改代码的独立于语言的沙箱
在处理动态的、不可信的内容(例如Web上的内容)时,必须对软件行为进行沙盒处理,通常是通过使用JavaScript之类的语言。然而,即使对于这种专门设计的语言,也很难确保高度优化的动态语言运行时的安全性,为了提高效率,这些运行时依赖于即时(JIT)编译、大型本地代码支持例程库以及多线程和垃圾收集的复杂机制等高级技术。每个新的运行时都提供了一个新的潜在攻击面,这种安全风险为采用新语言创建不受信任的内容增加了障碍。为了消除这一限制,本文介绍了安全有效的沙盒软件的一般机制,例如动态语言运行库,它利用了高级的低级技术,如运行时代码修改。我们的独立于语言的沙箱建立在基于软件的故障隔离(SFI)上,这是一种传统的静态技术。我们通过添加新的约束和机制提供了一种更灵活的SFI形式,这些约束和机制允许在运行时代码修改的情况下保证安全性。我们已经将我们的扩展添加到x86-32和x86-64变体的生产质量,基于sfi的沙箱平台;在这两种体系结构上,SFI机制面临着不同的挑战。我们还将两个代表性的语言平台移植到我们的扩展沙箱中:Mono公共语言运行库和V8 JavaScript引擎。在详细的评估中,我们发现沙箱减速在不同的基准测试、语言和硬件平台之间是不同的。开销通常是适度的,对于一些重要的基准/平台组合,它们接近于零。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书