Repository navigation
fix(java-base): Disable Base64 intrinsics to mitigate CVE-2026-114938 - #1741
Conversation
sbernauer
left a comment
There was a problem hiding this comment.
LGTM, but a few points
- We should track to remove this again, maybe the deprecation board and schedule it for the next release?
- Not sure how hard it is to contain this "fix" to only amd64 and leave arm64 as is - maybe ask AI? If it is more than like 5 lines I'm ok as-is.
- We should definitely mention this in the release notes, as this could be a performance regression
boil currently has no feature to differentiate builds by the target architecture. This could be something we can add.
I agree. @dervoeti can you write up a short release note snippet as a comment or as part of the PR description? |
sbernauer
left a comment
There was a problem hiding this comment.
Point 2 has been addressed, thank you!
Release noteThe Java based product images now disable the HotSpot Base64 intrinsics on amd64 ( |
|
Follow up issue: #1742 |
Description
Mitigates CVE-2026-114938 (Java4Shell) in all Java based images.
The HotSpot Base64 decode intrinsic in OpenJDK 17.0.6 and later can write up to 63 bytes past the end of the output buffer on x86-64 CPUs with AVX-512 VBMI. Temurin does not seem to have fixed builds yet.
As suggested in the recommendations, we now set
JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics", so the JVM falls back to the pure Java Base64 implementation.All product images with a JVM use one of these two images as the base of their final stage, so they pick this up on rebuild.
Things to be aware of:
Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsicsto stderr on every start.JAVA_TOOL_OPTIONSon a Pod replaces the value from the image and removes the mitigation, we should inform our customers about that.Testing
Built
java-base11 and 25 andjdk-base21 from this branch. In all three the JVM starts and reportsUseBASE64Intrinsics = false.On a node with AVX-512 VBMI (Ice Lake) I ran the
Base64Triggerreproducer published in the advisory:kafka:4.2.1-stackable26.7.0(Temurin25.0.3+9): reproducedkafka:3.9.2-stackable26.7.0(Temurin21.0.11+10): reproduced.java-base25 from this branch (Temurin25.0.5+8): not reproduced.java-base25 withJAVA_TOOL_OPTIONSset to an empty value: reproduced again, so the flag is what prevents it and not the newer Temurin build.Definition of Done Checklist
Note
Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant.
Please make sure all these things are done and tick the boxes
TIP: Running integration tests with a new product image
The image can be built and uploaded to the kind cluster with the following commands:
See the output of
boilto retrieve the image manifest URI for<MANIFEST_URI>.