Quarantine: a framework to mitigate memory errors in JNI applications

Du Li, W. Srisa-an
{"title":"Quarantine: a framework to mitigate memory errors in JNI applications","authors":"Du Li, W. Srisa-an","doi":"10.1145/2093157.2093159","DOIUrl":null,"url":null,"abstract":"By using Java Native Interface (JNI), programmers can integrate Java programs with legacy applications or third-party libraries written in other languages (e.g., C, C++, and Pascal). However, the use of JNI can bypass the Java boundary checking and exception-handling mechanisms. Furthermore, its use can violate Java's type-safety feature because of the type-mismatches between native programs and Java programs. As a result, such integration can cause various security issues including heap errors that can be dangerous and difficult to detect.\n In this paper, we introduce Quarantine, a runtime system that can identify objects accessible by native methods and then migrate these objects to a quarantine area, which is used specifically to host this type of object. The goal of Quarantine is to create a runtime platform that allows programmers to apply existing heap protection techniques that have been designed for native languages but do not work well in the Java domain. We implemented Quarantine in Jikes RVM and evaluated its performance using the optimizing compiler. Our results using nine benchmark programs indicate that Quarantine, on average, incurs execution overhead of 14% and 13% when the heap is two and five times larger than the minimum heap requirement for an application, respectively.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2011-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Principles and Practice of Programming in Java","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2093157.2093159","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9

Abstract

By using Java Native Interface (JNI), programmers can integrate Java programs with legacy applications or third-party libraries written in other languages (e.g., C, C++, and Pascal). However, the use of JNI can bypass the Java boundary checking and exception-handling mechanisms. Furthermore, its use can violate Java's type-safety feature because of the type-mismatches between native programs and Java programs. As a result, such integration can cause various security issues including heap errors that can be dangerous and difficult to detect. In this paper, we introduce Quarantine, a runtime system that can identify objects accessible by native methods and then migrate these objects to a quarantine area, which is used specifically to host this type of object. The goal of Quarantine is to create a runtime platform that allows programmers to apply existing heap protection techniques that have been designed for native languages but do not work well in the Java domain. We implemented Quarantine in Jikes RVM and evaluated its performance using the optimizing compiler. Our results using nine benchmark programs indicate that Quarantine, on average, incurs execution overhead of 14% and 13% when the heap is two and five times larger than the minimum heap requirement for an application, respectively.
隔离:一个框架,用于减少JNI应用程序中的内存错误
通过使用Java本机接口(JNI),程序员可以将Java程序与遗留应用程序或用其他语言编写的第三方库(例如,C、c++和Pascal)集成在一起。但是,使用JNI可以绕过Java边界检查和异常处理机制。此外,它的使用可能会违反Java的类型安全特性,因为本机程序和Java程序之间的类型不匹配。因此,这种集成可能会导致各种安全问题,包括可能很危险且难以检测的堆错误。在本文中,我们介绍了Quarantine,这是一个运行时系统,它可以识别本机方法可访问的对象,然后将这些对象迁移到隔离区,隔离区专门用于托管此类对象。Quarantine的目标是创建一个运行时平台,该平台允许程序员应用为本地语言设计的现有堆保护技术,这些技术在Java领域中不能很好地工作。我们在Jikes RVM中实现了隔离,并使用优化编译器评估了其性能。我们使用9个基准程序得出的结果表明,当堆比应用程序的最小堆需求大2倍和5倍时,Quarantine平均会分别产生14%和13%的执行开销。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信