Item

MTE4JNI: A Memory Tagging Method to Protect Java Heap Memory from Illicit Native Code Access

Chen, Huinan
Ma, Jiang
Xue, Chun Jason
Li, Qing'an
Supervisor
Department
Computer Science
Embargo End Date
Type
Conference proceeding
Date
2025
License
Language
English
Collections
Research Projects
Organizational Units
Journal Issue
Abstract
With the proliferation of mobile devices in daily life, ensuring the security and performance of these devices has become crucial. On Android, the Java Native Interface (JNI) acts as a bridge, allowing native libraries to directly access Java heap memory via raw pointers, bypassing Java's built-in safety checks. While this offers powerful functionality and performance, it also threatens the memory safety of the Java heap. Recently, Memory Tagging Extension (MTE) is introduced into the ARM architectures to enhance memory safety, reducing software vulnerabilities caused by illegal memory operations. This paper proposes MTE4JNI, an MTE-based JNI checking method, to protect Java heap memory from illicit native code access. Experimental results on real Android devices demonstrate that, compared to the currently employed guarded copy method, the proposed MTE4JNI method provides superior memory safety protection, while significantly reducing the runtime overhead on average by 11x and 27x for single-threaded and multi-threaded environments, respectively.
Citation
H. Chen, J. Ma, C. J. Xue, and Q. Li, “MTE4JNI: A Memory Tagging Method to Protect Java Heap Memory from Illicit Native Code Access,” Proceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization, pp. 377–389, Mar. 2025, doi: 10.1145/3696443.3708933.
Source
Proceedings of the 23rd ACM/IEEE International Symposium on Code Generation, 2025
Conference
Keywords
Java Native Interface (JNI) security, Memory Tagging Extension (MTE), Java heap memory protection, Native code access control, roid security?
Subjects
Source
Publisher
Association for Computing Machinery
Full-text link