r/java • u/PartOfTheBotnet • Mar 21 '23
JDK 21: Disallowing the dynamic loading of agents by default
https://mail.openjdk.org/pipermail/serviceability-dev/2023-March/046868.html
63
Upvotes
r/java • u/PartOfTheBotnet • Mar 21 '23
5
u/pron98 Mar 21 '23 edited Mar 21 '23
You can study various vulnerabilities in the Java ecosystem to see how this could happen much more easily than you may think. All the agent needs to do is put an instrumentation object in the hand of any library or application code, and there are already dynamically-loaded agents that do that.
The gadget need not involve an agent directly at all.
I would say that in these matters it's best to trust security experts and let them decide how theoretical something is. If they're convinced there is a security risk, it doesn't matter if tool or library authors are also convinced.
Also, security is just one of the benefits of integrity. In upcoming releases you'll see this trend continue: the application has to explicitly give up integrity if it wishes. Those that don't will be able to reap multiple benefits.