Kotlin : JNI usage
Overview
Java Native Interface (JNI) is a standard mechanism for launching native code in a Java virtual machine (JVM).
When JNI is used incorrectly, application security may be at risk due to vulnerabilities in the called native code.
For example, if the application calls the code written in C with the use of unsafe functions (e.g., gets()) via JNI, it is vulnerable to buffer overflow, despite the fact that the Java language is protected from such vulnerabilities. It must be taken into account that this protection does not apply to code that is called by JNI.
Since both Java code and native code called via JNI can create Java-objects and share them, the vulnerabilities in the native code can lead to more hardly detected mistakes and vulnerabilities.
DerScanner Severity Score
Check your Kotlin code for this vulnerability, free
Request a free pilot of DerScanner. We give you access and help with the first scan. It works in the cloud and on-premise.
Try it on your code, free
By submitting this form, I acknowledge that DerScanner may process my personal data I provided above for purposes explained above. More details about the processing.
