skip to main content
10.1145/2500828.2500848acmconferencesArticle/Chapter ViewAbstractPublication PagespppjConference Proceedingsconference-collections
research-article

JNICodejail: native code isolation for Java programs

Published: 11 September 2013 Publication History

Abstract

The Java Native Interface (JNI) allows Java programmers to inter-operate with code written in other languages like C and C++. One reason to use JNI is to get higher performance. Other reasons are to access low-level implementation features not available in pure Java and facilitate the reuse of existing code and libraries. However, the drawback is that native code can be used to compromise the security of the rest of Java.
In this paper, we propose JNICodejail, which sandboxes the native code used in JNI. JNICodejail ensures that the native code is unable to affect the rest of Java (except what is allowed through JNI) and is confined only with the appropriate system privileges. However, native code is allowed to read memory outside its sandbox, thus, it is possible to share data which is read-only with the sandbox for improved efficiency. A recent alternative for sandboxing JNI native code is Arabica. We demonstrate that our JNICodejail prototype can have reasonable performance with respect to both normal un-sandboxed JNI execution and sandboxing with Arabica.

References

[1]
D. Li and W. Srisa-an. Quarantine: a Framework to Mitigate Memory Errors in JNI Applications. In PPPJ, 2011.
[2]
G. Tan and J. Croft. An Empirical Security Study of the Native Code in the JDK. In USENIX Security, 2008.
[3]
S. Liang. Java Native Interface: Programmer's Guide and Reference, Addison-Wesley, 1999.
[4]
G. Tan, S. Chakradhar, R. Srivaths, and R. D. Wang. Safe Java Native Interface. In In IEEE Intl. Symp. on Secure Software Engineering, 2006.
[5]
B. Lee, M. Hirzel, R. Grimm, B. Wiedermann, and K. S. Mckinley. Jinn: Synthesizing a Dynamic Bug Detector for Foreign Language Interfaces. In PLDI, 2010.
[6]
G. C. Necula, J. Condit, M. Harren, S. McPeak, and W. Weimer. Ccured: Type-safe Retrofitting of Legacy Software. In TOPLAS, 27(3), 2005.
[7]
J. Siefers, G. Tan, and G. Morrisett. Robusta: Taming the Native Beast of the JVM. In CCS, 2010.
[8]
M. Sun and G. Tan. JVM-portable Sandboxing of Java Native Libraries. In ESORICS, 2012.
[9]
B. Yee, D. Sehr, G. Dardyk, J. B. Chen, R. Muth, T. Ormandy, S. Okasaka, N. Narula, and N. Fullagar. Native Client: A Sandbox for Portable, Untrusted x86 Native Code. In IEEE S&P, 2009.
[10]
Y. Wu, S. Sathyanarayan, R. H. C. Yap, and Z. Liang. Codejail: Application-transparent Isolation of Libraries with Tight Program Interactions. In ESORICS, 2012.
[11]
R. Wahbe, S. Lucco, T. E. Anderson, and S. L. Graham. Efficient Software-based Fault Isolation. In SOSP, 1993.
[12]
http://docs.oracle.com/javase/7/docs/api/java/util/zip/Deflater.html

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PPPJ '13: Proceedings of the 2013 International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools
September 2013
188 pages
ISBN:9781450321112
DOI:10.1145/2500828
Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author.

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 September 2013

Check for updates

Author Tags

  1. JNI
  2. Java
  3. sandboxing
  4. software fault isolation

Qualifiers

  • Research-article

Conference

PPPJ '13
PPPJ '13: virtual machines, languages, and tools
September 11 - 13, 2013
Stuttgart, Germany

Acceptance Rates

Overall Acceptance Rate 29 of 58 submissions, 50%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 183
    Total Downloads
  • Downloads (Last 12 months)8
  • Downloads (Last 6 weeks)0
Reflects downloads up to 14 Jan 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media