From e24f8d4346fb797f2c24a8b8ee463946c25221da Mon Sep 17 00:00:00 2001 From: dervoeti Date: Wed, 18 Nov 2026 09:40:43 +0000 Subject: [PATCH 1/4] fix(java-base): Disable Base64 intrinsics to mitigate CVE-2026-114938 --- CHANGELOG.md | 1 + java-base/Dockerfile | 8 ++++++++ jdk-base/Dockerfile | 8 ++++++++ 3 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31ffbb5d4..7daad36e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -116,6 +116,7 @@ All notable changes to this project will be documented in this file. - spark-connect-client: Point grpcio to the system trust store ([#1715]). - nifi: Bump Hazelcast to `5.7.0` (partial backport of [NIFI-15942](https://issues.apache.org/jira/browse/NIFI-15942)) to fix CVE-2026-107726, for `2.6.0` and `2.9.0` ([#1737]). - superset: Bump brotli to `1.2.1` to fix CVE-2026-111497 ([#1737]). +- java-base, jdk-base: Disable the HotSpot Base64 intrinsics via `JAVA_TOOL_OPTIONS` to mitigate CVE-2026-114938 ([#XXXX]). - hbase: Add `hadoop-azure` to the HBase `lib` directory again, so that `abfs://` works. This regressed in 26.7.0 with [#1511] ([#1731]). - trino: Backport [trinodb/trino#26806](https://github.com/trinodb/trino/pull/26806) to `477` to fix `appendPositions` on `RowBlockBuilder` ignoring the offset ([#1738]). diff --git a/java-base/Dockerfile b/java-base/Dockerfile index 4f5eaa54e..2ccdbdc3b 100644 --- a/java-base/Dockerfile +++ b/java-base/Dockerfile @@ -60,6 +60,14 @@ ENV JAVA_VERSION=$PRODUCT_VERSION # disables the vulnerable feature ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true +# Mitigation for CVE-2026-114938 (Java4Shell) +# The HotSpot Base64 decode intrinsic in OpenJDK 17.0.6 and later can write out of bounds on +# x86-64 CPUs with AVX-512 VBMI. This disables the Base64 intrinsics, so that the JVM falls back +# to the pure Java implementation. +# NOTE: The JVM logs "Picked up JAVA_TOOL_OPTIONS: ..." to stderr on every start. +# TODO: Remove once every Temurin version we install contains the upstream fix. +ENV JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics" + # We are adding jvmkill, as it improves shutdown of the JVM in case it runs out of native threads. # See https://github.com/stackabletech/docker-images/issues/1578 for motivation/details. COPY --chown=${STACKABLE_USER_UID}:0 --from=jvmkill-builder /stackable/libjvmkill.so /stackable/libjvmkill.so diff --git a/jdk-base/Dockerfile b/jdk-base/Dockerfile index 914ab6cf9..0c5e5404b 100644 --- a/jdk-base/Dockerfile +++ b/jdk-base/Dockerfile @@ -57,3 +57,11 @@ ENV JAVA_VERSION=$PRODUCT_VERSION # This variable is supported as of Log4j version 2.10 and # disables the vulnerable feature ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true + +# Mitigation for CVE-2026-114938 (Java4Shell) +# The HotSpot Base64 decode intrinsic in OpenJDK 17.0.6 and later can write out of bounds on +# x86-64 CPUs with AVX-512 VBMI. This disables the Base64 intrinsics, so that the JVM falls back +# to the pure Java implementation. +# NOTE: The JVM logs "Picked up JAVA_TOOL_OPTIONS: ..." to stderr on every start. +# TODO: Remove once every Temurin version we install contains the upstream fix. +ENV JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics" From b383a95b5b9a60d9a29f4bce8075d2b46ed32bad Mon Sep 17 00:00:00 2001 From: dervoeti Date: Wed, 18 Nov 2026 10:57:18 +0100 Subject: [PATCH 2/4] chore: Changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7daad36e8..a64316e6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -116,7 +116,7 @@ All notable changes to this project will be documented in this file. - spark-connect-client: Point grpcio to the system trust store ([#1715]). - nifi: Bump Hazelcast to `5.7.0` (partial backport of [NIFI-15942](https://issues.apache.org/jira/browse/NIFI-15942)) to fix CVE-2026-107726, for `2.6.0` and `2.9.0` ([#1737]). - superset: Bump brotli to `1.2.1` to fix CVE-2026-111497 ([#1737]). -- java-base, jdk-base: Disable the HotSpot Base64 intrinsics via `JAVA_TOOL_OPTIONS` to mitigate CVE-2026-114938 ([#XXXX]). +- java-base, jdk-base: Disable the HotSpot Base64 intrinsics via `JAVA_TOOL_OPTIONS` to mitigate CVE-2026-114938 ([#1741]). - hbase: Add `hadoop-azure` to the HBase `lib` directory again, so that `abfs://` works. This regressed in 26.7.0 with [#1511] ([#1731]). - trino: Backport [trinodb/trino#26806](https://github.com/trinodb/trino/pull/26806) to `477` to fix `appendPositions` on `RowBlockBuilder` ignoring the offset ([#1738]). @@ -206,6 +206,7 @@ All notable changes to this project will be documented in this file. [#1735]: https://github.com/stackabletech/docker-images/pull/1735 [#1737]: https://github.com/stackabletech/docker-images/pull/1737 [#1738]: https://github.com/stackabletech/docker-images/pull/1738 +[#1741]: https://github.com/stackabletech/docker-images/pull/1741 ## [26.7.0] - 2026-07-21 From 7c04241b0cddecc987e100143ccae41b27a6f6c2 Mon Sep 17 00:00:00 2001 From: dervoeti Date: Wed, 18 Nov 2026 11:02:11 +0000 Subject: [PATCH 3/4] fix(java-base): Only disable Base64 intrinsics on amd64 --- CHANGELOG.md | 2 +- java-base/Dockerfile | 10 ++++++---- jdk-base/Dockerfile | 10 ++++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a64316e6f..615705a87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -116,7 +116,7 @@ All notable changes to this project will be documented in this file. - spark-connect-client: Point grpcio to the system trust store ([#1715]). - nifi: Bump Hazelcast to `5.7.0` (partial backport of [NIFI-15942](https://issues.apache.org/jira/browse/NIFI-15942)) to fix CVE-2026-107726, for `2.6.0` and `2.9.0` ([#1737]). - superset: Bump brotli to `1.2.1` to fix CVE-2026-111497 ([#1737]). -- java-base, jdk-base: Disable the HotSpot Base64 intrinsics via `JAVA_TOOL_OPTIONS` to mitigate CVE-2026-114938 ([#1741]). +- java-base, jdk-base: Disable the HotSpot Base64 intrinsics on amd64 via `JAVA_TOOL_OPTIONS` to mitigate CVE-2026-114938 ([#1741]). - hbase: Add `hadoop-azure` to the HBase `lib` directory again, so that `abfs://` works. This regressed in 26.7.0 with [#1511] ([#1731]). - trino: Backport [trinodb/trino#26806](https://github.com/trinodb/trino/pull/26806) to `477` to fix `appendPositions` on `RowBlockBuilder` ignoring the offset ([#1738]). diff --git a/java-base/Dockerfile b/java-base/Dockerfile index 2ccdbdc3b..4acd26d89 100644 --- a/java-base/Dockerfile +++ b/java-base/Dockerfile @@ -62,11 +62,13 @@ ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true # Mitigation for CVE-2026-114938 (Java4Shell) # The HotSpot Base64 decode intrinsic in OpenJDK 17.0.6 and later can write out of bounds on -# x86-64 CPUs with AVX-512 VBMI. This disables the Base64 intrinsics, so that the JVM falls back -# to the pure Java implementation. -# NOTE: The JVM logs "Picked up JAVA_TOOL_OPTIONS: ..." to stderr on every start. +# x86-64 CPUs with AVX-512 VBMI. This disables the Base64 intrinsics on amd64, so that the JVM +# falls back to the pure Java implementation. On arm64 the variable is set, but empty. +# NOTE: The JVM logs "Picked up JAVA_TOOL_OPTIONS: ..." to stderr on every start, also when empty. # TODO: Remove once every Temurin version we install contains the upstream fix. -ENV JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics" +ARG TARGETARCH +ARG BASE64_MITIGATION="${TARGETARCH/amd64/-XX:-UseBASE64Intrinsics}" +ENV JAVA_TOOL_OPTIONS="${BASE64_MITIGATION/arm64/}" # We are adding jvmkill, as it improves shutdown of the JVM in case it runs out of native threads. # See https://github.com/stackabletech/docker-images/issues/1578 for motivation/details. diff --git a/jdk-base/Dockerfile b/jdk-base/Dockerfile index 0c5e5404b..244fb2b53 100644 --- a/jdk-base/Dockerfile +++ b/jdk-base/Dockerfile @@ -60,8 +60,10 @@ ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true # Mitigation for CVE-2026-114938 (Java4Shell) # The HotSpot Base64 decode intrinsic in OpenJDK 17.0.6 and later can write out of bounds on -# x86-64 CPUs with AVX-512 VBMI. This disables the Base64 intrinsics, so that the JVM falls back -# to the pure Java implementation. -# NOTE: The JVM logs "Picked up JAVA_TOOL_OPTIONS: ..." to stderr on every start. +# x86-64 CPUs with AVX-512 VBMI. This disables the Base64 intrinsics on amd64, so that the JVM +# falls back to the pure Java implementation. On arm64 the variable is set, but empty. +# NOTE: The JVM logs "Picked up JAVA_TOOL_OPTIONS: ..." to stderr on every start, also when empty. # TODO: Remove once every Temurin version we install contains the upstream fix. -ENV JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics" +ARG TARGETARCH +ARG BASE64_MITIGATION="${TARGETARCH/amd64/-XX:-UseBASE64Intrinsics}" +ENV JAVA_TOOL_OPTIONS="${BASE64_MITIGATION/arm64/}" From 505034d769b92e9e65120201b6c0e9420fed31ef Mon Sep 17 00:00:00 2001 From: dervoeti Date: Wed, 18 Nov 2026 11:08:22 +0000 Subject: [PATCH 4/4] fix(java-base): Use suffix removal to detect amd64 for the Base64 mitigation --- java-base/Dockerfile | 5 +++-- jdk-base/Dockerfile | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/java-base/Dockerfile b/java-base/Dockerfile index 4acd26d89..813b802f9 100644 --- a/java-base/Dockerfile +++ b/java-base/Dockerfile @@ -67,8 +67,9 @@ ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true # NOTE: The JVM logs "Picked up JAVA_TOOL_OPTIONS: ..." to stderr on every start, also when empty. # TODO: Remove once every Temurin version we install contains the upstream fix. ARG TARGETARCH -ARG BASE64_MITIGATION="${TARGETARCH/amd64/-XX:-UseBASE64Intrinsics}" -ENV JAVA_TOOL_OPTIONS="${BASE64_MITIGATION/arm64/}" +# "amd64" on amd64, empty on arm64 +ARG IS_AMD64=${TARGETARCH%arm64} +ENV JAVA_TOOL_OPTIONS="${IS_AMD64:+-XX:-UseBASE64Intrinsics}" # We are adding jvmkill, as it improves shutdown of the JVM in case it runs out of native threads. # See https://github.com/stackabletech/docker-images/issues/1578 for motivation/details. diff --git a/jdk-base/Dockerfile b/jdk-base/Dockerfile index 244fb2b53..f13b5ab42 100644 --- a/jdk-base/Dockerfile +++ b/jdk-base/Dockerfile @@ -65,5 +65,6 @@ ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true # NOTE: The JVM logs "Picked up JAVA_TOOL_OPTIONS: ..." to stderr on every start, also when empty. # TODO: Remove once every Temurin version we install contains the upstream fix. ARG TARGETARCH -ARG BASE64_MITIGATION="${TARGETARCH/amd64/-XX:-UseBASE64Intrinsics}" -ENV JAVA_TOOL_OPTIONS="${BASE64_MITIGATION/arm64/}" +# "amd64" on amd64, empty on arm64 +ARG IS_AMD64=${TARGETARCH%arm64} +ENV JAVA_TOOL_OPTIONS="${IS_AMD64:+-XX:-UseBASE64Intrinsics}"