paperbot · PL 论文追踪

全部论文 待读 收藏

P2 CHERI JNI

CHERI JNI:面向 Java 原生代码接口的硬件辅助安全机制
ASPLOS Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems2017匹配度 2/10 · 论文聚焦 CHERI 硬件辅助的 JNI 内存安全与隔离,属于系统/安全/运行时方向;未涉及静态分析、形式化验证、浮点程序分析、贝叶斯程序分析,也未与 LLM/Agent 交叉。引用 51 inbox
David Chisnall, Brooks Davis, Khilan Gudka, David Brazdil, Alexandre Joannou, Jonathan Woodruff, A. Theodore Markettos, J. Edward Maste, Robert Norton, Stacey Son, Michael Roe, Simon W. Moore, Peter G. Neumann, Ben Laurie, Robert N.M. Watson
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:利用 CHERI 能力硬件为 JNI 原生代码提供内存安全与隔离,使原生代码达到 Java 同等安全性且性能开销可忽略。

Java 依赖内存保护构建高层安全模型,但通过 JNI 链接的原生代码(包括标准库的大量 C 实现)可绕过内存保护与高层策略。本文提出硬件辅助的 Java 原生代码接口实现,将 Java 安全模型所需保证扩展到原生代码。设计支持对 JVM 拥有的缓冲区进行安全直接访问,并在需要时由硬件强制只读;还引入 Java 语法以声明式描述原生代码的隔离隔间。作者在 C 代码中保留 Java 安全模型的内存安全与隔离要求,使原生代码与 Java 代码同进程运行时具有等价安全影响,性能相对现有不安全原生接口几乎无开销,并在 FPGA 综合的 CHERI 微处理器上给出原型。

问题
JNI 及链接到 Java 程序的原生代码可绕过 Java 的内存保护和高层安全策略,破坏 Java 安全模型。
方法
基于 CHERI 能力硬件实现硬件辅助 JNI,提供安全直接缓冲访问、硬件强制只读和 Java 语法声明的原生代码隔离隔间。
评估
在 FPGA 综合的 CHERI 微处理器上实现原型,并与现有不安全 JNI 比较安全性与性能,显示内存安全与隔离得以保持且开销可忽略。
原文摘要(Abstract)

Java provides security and robustness by building a high-level security model atop the foundation of memory protection. Unfortunately, any native code linked into a Java program -- including the million lines used to implement the standard library -- is able to bypass both the memory protection and the higher-level policies. We present a hardware-assisted implementation of the Java native code interface, which extends the guarantees required for Java's security model to native code. Our design supports safe direct access to buffers owned by the JVM, including hardware-enforced read-only access where appropriate. We also present Java language syntax to declaratively describe isolated compartments for native code. We show that it is possible to preserve the memory safety and isolation requirements of the Java security model in C code, allowing native code to run in the same process as Java code with the same impact on security as running equivalent Java code. Our approach has a negligible impact on performance, compared with the existing unsafe native code interface. We demonstrate a prototype implementation running on the CHERI microprocessor synthesized in FPGA.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{ChisnallDGBJWMM17,
  title = {CHERI JNI},
  author = {David Chisnall and Brooks Davis and Khilan Gudka and David Brazdil and Alexandre Joannou and Jonathan Woodruff and A. Theodore Markettos and J. Edward Maste and Robert Norton and Stacey Son and Michael Roe and Simon W. Moore and Peter G. Neumann and Ben Laurie and Robert N.M. Watson},
  booktitle = {ASPLOS},
  year = {2017},
  doi = {10.1145/3037697.3037725}
}