Repository navigation
Conversation
Set JAVA_OPTS_APPEND=-XX:-UseBASE64Intrinsics in the final stage of the Keycloak images to disable the vulnerable AVX-512 Base64 decode intrinsic (CVE-2026-114938). kc.sh appends it to its default JAVA_OPTS. The base image stays on 26.7.5, already the latest 26.7 patch. Refs sequentech/meta#15037 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
@coderabbitai review |
Action performed
|
|
Superseded by #4283, which follows the meta#15038/meta#15039 branch and title conventions. |
Parent issue: https://github.com/sequentech/meta/issues/15037
Summary
packages/Dockerfile.keycloakandpackages/Dockerfile.keycloak-vstl-buildnow setsENV JAVA_OPTS_APPEND="-XX:-UseBASE64Intrinsics". This turns off the vulnerable x86-64 AVX-512 Base64 decode intrinsic.26.7.5(same digest,sha256:37dbaf6f…) because that is already the latest 26.7 patch on quay.io (26.7.5-0has the same digest). The image ships Red Hat OpenJDK 21.0.12.1, which is still vulnerable. No fixed JDK or Keycloak image exists yet, so this PR has no upgrade notes.Why
Java4Shell (CVE-2026-114938, https://calif.io/java4shell/): Calif reports pre-auth RCE against Keycloak in its default config on x86-64 hosts with AVX-512 VBMI. Tracking: https://github.com/sequentech/meta/issues/15037.
Notes:
kc.shappendsJAVA_OPTS_APPENDto its defaultJAVA_OPTS, so the defaults stay in place. SettingJAVA_OPTSwould replace them.JAVA_OPTS_APPENDeven whenJAVA_OPTSis set in the deployment env, so the flag still reaches the JVM where gitops replacesJAVA_OPTS. A deployment envJAVA_OPTS_APPENDoverrides this image ENV, so it must keep the flag. The gitops PR (sequentech/gitops#12532) sets the same value in the deployment env, which also covers image tags built before this change.-XX:-UseBASE64Intrinsicsis accepted (only-XX:UseAVX=2is rejected). I left out-XX:+IgnoreUnrecognizedVMOptionsso that typos in other options still fail loudly.Rollout
Merge, build and deploy the Keycloak image as usual. Keycloak config does not change. Remove the flag once a fixed Red Hat JDK lands in an upstream Keycloak image.
Testing
docker buildx build --build-context beyond=<empty dir> -f packages/Dockerfile.keycloak packagessucceeded (the private beyond extensions were not included).java -XX:-UseBASE64Intrinsics -XX:+PrintFlagsFinal -versionin the built image printsUseBASE64Intrinsics = false {command line}.start-devwith the image ENV: kc.sh logs "Appending additional Java properties to JAVA_OPTS", the JVM command line includes-XX:-UseBASE64Intrinsics, and Keycloak 26.7.5 started.releasefile).@coderabbitai review
🤖 Generated with Claude Code
Summary by CodeRabbit