Hacker News new | ask | show | jobs
by mzs 14 days ago
You can also mitigate Java4Shell by starting OpenJDK with either:

-XX:-UseBASE64Intrinsics to disable hardware-accelerated Base64 encoding and decoding, or

-XX:UseAVX=2 to disable AVX-512. Apply this flag only on x86-64 hosts. OpenJDK on ARM doesn't recognize it and will fail to start.

1 comments

Might be worth examining whether AVX-512 is even supported on the machine before freaking out, too.
if you run it in a vm - certain CPU profiles will hide features like AVX-512.

I know I purposely do it for smolvm to avoid exposure