r/programming • • 4d ago

Java4Shell is a reason to use Java

https://mccue.dev/pages/11-18-26-java4shell
44 Upvotes

50 comments sorted by

View all comments

Show parent comment

10

u/bowbahdoe 4d ago

I think both --enable-native-access and --module-path are integrity features, but integrity features are security features. Here the issue is that native code mucks with the JVM's memory. Thats an issue for integrity that also lets people do RCE (allegedly).

The module system stuff is similar. Code in a library can't accidentally mess with the threading model since java.lang.Thread hides that stuff in the java.base module. Putting user code in modules also limits the scope of what a badly written library can do to that code.

Network and File System level security is mostly left up to Docker/OS controls though.

13

u/svick 3d ago

You really shouldn't treat non-security features as security features.

If a bug is found in a security feature, the usual approach is:

  • We need to fix this ASAP.
  • We try hard to prevent anyone from knowing anything about it before it's fixed.
  • We make sure it's fixed in all supported versions.

If a bug is found in a non-security feature, the more usual approach is:

  • We'll get to it when we'll get to it.
  • Everything about the bug is public.
  • It's only going to be fixed in the version that comes out in many months.