Ehh as someone that likes Java I don’t really buy this. There have been plenty of RCEs unrelated to memory safety, the biggest one being the log4j one from a while ago. There were also a decent number of Jackson/native serialization ones that happened over the years. Sure a majority of the time it’s libraries that have issues rather than the platform or stdlib itself, but that’s not exclusive to Java.
The point seems to be that entire classes of security violations generally do not exist in Java (which is true), not that security violations do not exist in Java.
That’s more of an argument of memory safe vs not languages than being a pro for Java specifically. It would make more sense to compare to the number of RCEs or the response to them in other memory safe languages, e.g. Php or Ruby. Even then, as far as I know Go has had much fewer than Java. Honestly the number of CVEs that relate to both native and library serialization points to a deficiency in Java the platform.
The native code protections apply to JNI. The difference between the JVM and other ecosystems is that you will need to opt-in even if the JNI comes from a transitive dependency.
Pentlander | 4 hours ago
Ehh as someone that likes Java I don’t really buy this. There have been plenty of RCEs unrelated to memory safety, the biggest one being the log4j one from a while ago. There were also a decent number of Jackson/native serialization ones that happened over the years. Sure a majority of the time it’s libraries that have issues rather than the platform or stdlib itself, but that’s not exclusive to Java.
cpurdy | 3 hours ago
The point seems to be that entire classes of security violations generally do not exist in Java (which is true), not that security violations do not exist in Java.
It seems a reasonable point.
Pentlander | an hour ago
That’s more of an argument of memory safe vs not languages than being a pro for Java specifically. It would make more sense to compare to the number of RCEs or the response to them in other memory safe languages, e.g. Php or Ruby. Even then, as far as I know Go has had much fewer than Java. Honestly the number of CVEs that relate to both native and library serialization points to a deficiency in Java the platform.
orib | 2 hours ago
I'm assuming this person has never heard of the JNI.
[OP] emccue | 2 hours ago
The native code protections apply to JNI. The difference between the JVM and other ecosystems is that you will need to opt-in even if the JNI comes from a transitive dependency.