Repository navigation
Conversation
Set JAVA_OPTS_APPEND="-XX:-UseBASE64Intrinsics" in the final Keycloak image stage to disable the vulnerable AVX-512 Base64 decode intrinsic (CVE-2026-114938). kc.sh appends it to its own defaults. Bump the Keycloak base image from 26.6.1 to 26.6.4, the latest 26.6 patch. 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 #4282, which follows the meta#15038/meta#15039 branch and title conventions. |
Summary
ENV JAVA_OPTS_APPEND="-XX:-UseBASE64Intrinsics"in the final stage ofpackages/Dockerfile.keycloak(andDockerfile.keycloak-vstl-build), so every deployment of the image gets the Java4Shell mitigation even without gitops changes.26.6.1to26.6.4, the latest 26.6 patch on quay.io. Also updated: the vstl Dockerfiles and the voter-enrollment integration-test Dockerfile. The minor version stays the same. The images are still pinned by tag, as before.keycloak.version26.6.1.com.github.dasniko:keycloak-spi-bomonly goes up to 26.6.2 on Maven Central, so bumping the poms breaks the Maven build. The SPI deps areprovided, and runtime uses 26.6.4.Why
Tracking issue: sequentech/meta#15037.
Java4Shell (CVE-2026-114938) is an out-of-bounds heap write in OpenJDK's x86-64 AVX-512 VBMI Base64 decode intrinsic. It affects OpenJDK 17.0.6+ from every vendor. Calif reports pre-auth RCE against Keycloak in its default config. No fixed JDK exists yet. Both
keycloak:26.6.1andkeycloak:26.6.4ship Red Hat OpenJDK21.0.11.0.10-1, which is still vulnerable. Until there is a fixed JDK, the JVM flag is the mitigation.kc.shappendsJAVA_OPTS_APPENDafter its defaults (heap, GC, add-opens). UnlikeJAVA_OPTS, it does not replace them. The base image did not setJAVA_OPTS_APPENDbefore, and neither did this repo, so nothing gets overwritten.JAVA_OPTS_APPENDin its own env replaces this image value. For that reason the gitops PR sets the flag as well.UseBASE64Intrinsicson all architectures. So the flag is used bare, without-XX:+IgnoreUnrecognizedVMOptions, which would hide typos.Keycloak 26.6.2 → 26.6.4 upgrade notes (from the upstream migration guide)
aud(opt-out:allow-token-introspection-without-audience-check). UserInfo rejects lightweight access tokens. WebAuthn "Acceptable AAGUIDs" is now strict. Required actions andexecute-actions-emailtokens are single use. Avoid editing workflow definitions during a rolling update.https://host*). I found none in the repo's realm JSONs. The Admin user search no longer returns user-profile metadata. Extensions must not restart a session transaction. The token endpointtokenparameter is now capped at 20k chars. Requests with an invalid CORS Origin now get a 403 early.data/<realm>/. Registration access tokens cannot manage disabled clients.Rollout
Merging this PR does not change running deployments. They get the fix when the new Keycloak image is released and rolled out. The gitops PR sets the same flag through env for deployments that are not on this image yet.
Testing
All on an arm64 (aarch64) host:
docker buildx build --build-context beyond=<empty dir> -f packages/Dockerfile.keycloak packagesbuilds. Thebeyondsubmodule was not available locally, so beyond extensions were not part of the build. CI builds with them.JAVA_OPTS_APPEND=-XX:-UseBASE64Intrinsics.java -XX:-UseBASE64Intrinsics -XX:+PrintFlagsFinal -versionreportsUseBASE64Intrinsics = false {command line}, andtrue {default}without the flag.start-devagainst a throwaway Postgres: kc.sh logs "Appending additional Java properties to JAVA_OPTS", Keycloak 26.6.4 starts (Quarkus 3.33.2.1), the JVM cmdline contains the flag, and/realms/master/.well-known/openid-configurationreturns 200.@coderabbitai review
🤖 Generated with Claude Code
Summary by CodeRabbit