From a66c175f4ad61808a2b6bd484b73520d50625801 Mon Sep 17 00:00:00 2001 From: Kurt Boberg Date: Wed, 18 Nov 2026 12:15:01 -0800 Subject: [PATCH] Detect Oracle Java 8 Enterprise Performance Pack (EPP) EPP runs a JDK 17 HotSpot JVM under the Java 8 class library, so a 1.8.0_NNN runtime can carry the vulnerable decodeBlock stub. The scripts compared only java.version against 17.0.6 and reported EPP as not impacted. When a Java 8 build carries "-perf", check the JDK 17 JVM version from the perf build string instead (java.vm.version on hosts; package name, version or image name in the cloud scripts). If that version cannot be read, report [?] rather than OK. Fixes #7 Co-Authored-By: Claude Opus 5.5 --- CVE-2026-114938/README.md | 8 ++++ .../cloud/detect-jdk-8392044-aws.sh | 47 +++++++++++++++---- .../cloud/detect-jdk-8392044-gcp.sh | 47 +++++++++++++++---- CVE-2026-114938/cloud/tests/run-aws-tests.sh | 4 +- CVE-2026-114938/cloud/tests/run-gcp-tests.sh | 8 +++- CVE-2026-114938/linux/detect-jdk-8392044.sh | 46 ++++++++++++++---- CVE-2026-114938/linux/tests/fake-java | 7 +-- CVE-2026-114938/linux/tests/run-tests.sh | 6 +++ CVE-2026-114938/windows/Detect-Jdk8392044.ps1 | 31 ++++++++++-- CVE-2026-114938/windows/tests/FakeJava.cs | 4 ++ CVE-2026-114938/windows/tests/Run-Tests.ps1 | 6 +++ 11 files changed, 179 insertions(+), 35 deletions(-) diff --git a/CVE-2026-114938/README.md b/CVE-2026-114938/README.md index b7de5aa..3043c9d 100644 --- a/CVE-2026-114938/README.md +++ b/CVE-2026-114938/README.md @@ -53,6 +53,14 @@ All five conditions must hold for at least one JVM on the host: 3. Version 17.0.6 or later, not at or above a version listed in `FIXED_IN`, and no newer than the newest releases checked (see below). Newer versions are `[?]`: they may carry the fix. + + Oracle Java 8 Enterprise Performance Pack (EPP) is checked by its JVM + version, not its Java version. EPP runs a JDK 17 HotSpot JVM under the + Java 8 class library, and its build strings carry `-perf`. Oracle's + documented example shows runtime `1.8.0_345` with JVM + `17.0.4+1-perf-4711`. The JDK 17 version decides. The host scripts read + it from `java.vm.version`. The cloud scripts read it from the package name + or version when it is there. When it is not, the result is `[?]`. 4. The JVM reports `avx512_vbmi` and `avx512bw`, and `UseAVX >= 3`. 5. Base64 intrinsics are on and C2/JVMCI can compile. These turn it off: `-XX:-UseBASE64Intrinsics`, `-XX:DisableIntrinsic=_base64_decodeBlock`, diff --git a/CVE-2026-114938/cloud/detect-jdk-8392044-aws.sh b/CVE-2026-114938/cloud/detect-jdk-8392044-aws.sh index 75df82c..654e1ee 100755 --- a/CVE-2026-114938/cloud/detect-jdk-8392044-aws.sh +++ b/CVE-2026-114938/cloud/detect-jdk-8392044-aws.sh @@ -372,14 +372,50 @@ ver_major() { fi } -# ver_any VERSION LABEL: full check when the patch level is known. +# ver_any VERSION LABEL [CONTEXT]: full check when the patch level is known. +# CONTEXT (image or package name) is searched for a Java 8 EPP build. ver_any() { + if ver_epp "$1" "$3"; then + V_VAL="$V_VAL ($2)" + return + fi case "$1" in *.*.*) ver_full "$1"; V_VAL="$V_VAL ($2)" ;; *) ver_major "${1%%.*}" "$2" ;; esac } +# Oracle Java 8 Enterprise Performance Pack (EPP) runs a JDK 17 HotSpot JVM +# under the Java 8 class library. Its builds carry "-perf": "1.8.0_345-perf", +# JVM "17.0.4+1-perf-4711". The JDK 17 version, not 1.8.0, decides. +# ver_epp VERSION TEXT: true when VERSION is Java 8 and VERSION or TEXT names +# an EPP build; sets V_VAL V_ST from the JDK 11+ version found in either. +ver_epp() { + local j + [ $(($(ver_key "$1") / 1000000)) -eq 8 ] || return 1 + case "$1 $2" in *perf*) ;; *) return 1 ;; esac + j=$(grep -oE '(^|[^0-9.])(1[1-9]|[2-9][0-9])\.[0-9]+\.[0-9]+' <<<"$1 $2" | head -1 | sed 's/^[^0-9]//') + if [ -n "$j" ]; then + ver_full "$j" + V_VAL="$1, Java 8 Enterprise Performance Pack, JVM $V_VAL" + else + V_VAL="$1, Java 8 Enterprise Performance Pack, JVM version not visible" V_ST=unknown + fi +} + +# ver_pkg NAME VERSION: version check for an installed package. +ver_pkg() { + local pv + pv=$(printf '%s' "$2" | sed -E 's/^[0-9]+://') + ver_epp "$pv" "$1" && return + pv=$(printf '%s' "$pv" | sed -E 's/^([0-9][0-9._]*).*/\1/; s/[._]$//') + case "$pv" in + *.*.*) ver_full "$pv" ;; + [0-9]*) ver_major "${pv%%.*}" "package" ;; + *) V_VAL="unreadable" V_ST=unknown ;; + esac +} + # eval_flags "FLAGS low to high precedence" -> F_ST (impacted|ok) F_VAL F_AVX eval_flags() { local b64=1 comp=1 tiered=1 stop=4 dis="" f @@ -894,7 +930,7 @@ scan_ecs() { chk vm "$C_VAL (image)" "$C_ST" fi if [ -n "$I_VER" ]; then - ver_any "$I_VER" "image tag" + ver_any "$I_VER" "image tag" "$image" chk "java version" "$V_VAL" "$V_ST" else chk "java version" "not in image tag" unknown @@ -1011,12 +1047,7 @@ scan_ec2() { chk arch "$iarch" impacted vm_class "$pk" chk vm "$C_VAL ($pk)" "$C_ST" - pv=$(printf '%s' "$pv" | sed -E 's/^[0-9]+://; s/^([0-9][0-9._]*).*/\1/; s/[._]$//') - case "$pv" in - *.*.*) ver_full "$pv" ;; - [0-9]*) ver_major "${pv%%.*}" "package" ;; - *) V_VAL="unreadable" V_ST=unknown ;; - esac + ver_pkg "$pk" "$pv" chk "java version" "$V_VAL" "$V_ST" flags_check "" "$udf" "user data" avx_check "$X_ST" "$X_VAL" "$F_AVX" diff --git a/CVE-2026-114938/cloud/detect-jdk-8392044-gcp.sh b/CVE-2026-114938/cloud/detect-jdk-8392044-gcp.sh index 8335f69..13d5487 100755 --- a/CVE-2026-114938/cloud/detect-jdk-8392044-gcp.sh +++ b/CVE-2026-114938/cloud/detect-jdk-8392044-gcp.sh @@ -400,14 +400,50 @@ ver_major() { fi } -# ver_any VERSION LABEL: full check when the patch level is known. +# ver_any VERSION LABEL [CONTEXT]: full check when the patch level is known. +# CONTEXT (image or package name) is searched for a Java 8 EPP build. ver_any() { + if ver_epp "$1" "$3"; then + V_VAL="$V_VAL ($2)" + return + fi case "$1" in *.*.*) ver_full "$1"; V_VAL="$V_VAL ($2)" ;; *) ver_major "${1%%.*}" "$2" ;; esac } +# Oracle Java 8 Enterprise Performance Pack (EPP) runs a JDK 17 HotSpot JVM +# under the Java 8 class library. Its builds carry "-perf": "1.8.0_345-perf", +# JVM "17.0.4+1-perf-4711". The JDK 17 version, not 1.8.0, decides. +# ver_epp VERSION TEXT: true when VERSION is Java 8 and VERSION or TEXT names +# an EPP build; sets V_VAL V_ST from the JDK 11+ version found in either. +ver_epp() { + local j + [ $(($(ver_key "$1") / 1000000)) -eq 8 ] || return 1 + case "$1 $2" in *perf*) ;; *) return 1 ;; esac + j=$(grep -oE '(^|[^0-9.])(1[1-9]|[2-9][0-9])\.[0-9]+\.[0-9]+' <<<"$1 $2" | head -1 | sed 's/^[^0-9]//') + if [ -n "$j" ]; then + ver_full "$j" + V_VAL="$1, Java 8 Enterprise Performance Pack, JVM $V_VAL" + else + V_VAL="$1, Java 8 Enterprise Performance Pack, JVM version not visible" V_ST=unknown + fi +} + +# ver_pkg NAME VERSION: version check for an installed package. +ver_pkg() { + local pv + pv=$(printf '%s' "$2" | sed -E 's/^[0-9]+://') + ver_epp "$pv" "$1" && return + pv=$(printf '%s' "$pv" | sed -E 's/^([0-9][0-9._]*).*/\1/; s/[._]$//') + case "$pv" in + *.*.*) ver_full "$pv" ;; + [0-9]*) ver_major "${pv%%.*}" "package" ;; + *) V_VAL="unreadable" V_ST=unknown ;; + esac +} + # eval_flags "FLAGS low to high precedence" -> F_ST (impacted|ok) F_VAL F_AVX eval_flags() { local b64=1 comp=1 tiered=1 stop=4 dis="" f @@ -606,7 +642,7 @@ scan_run() { chk vm "$C_VAL (image)" "$C_ST" fi if [ -n "$I_VER" ]; then - ver_any "$I_VER" "image tag" + ver_any "$I_VER" "image tag" "$image" chk "java version" "$V_VAL" "$V_ST" else chk "java version" "not in image tag" unknown @@ -808,12 +844,7 @@ scan_compute() { chk arch x86_64 impacted vm_class "$pk" chk vm "$C_VAL ($pk)" "$C_ST" - pv=$(printf '%s' "$pv" | sed -E 's/^[0-9]+://; s/^([0-9][0-9._]*).*/\1/; s/[._]$//') - case "$pv" in - *.*.*) ver_full "$pv" ;; - [0-9]*) ver_major "${pv%%.*}" "package" ;; - *) V_VAL="unreadable" V_ST=unknown ;; - esac + ver_pkg "$pk" "$pv" chk "java version" "$V_VAL" "$V_ST" flags_check "" "$md" "the startup script" avx_check "$X_ST" "$X_VAL" "$F_AVX" diff --git a/CVE-2026-114938/cloud/tests/run-aws-tests.sh b/CVE-2026-114938/cloud/tests/run-aws-tests.sh index ff56db4..e0b4bb2 100755 --- a/CVE-2026-114938/cloud/tests/run-aws-tests.sh +++ b/CVE-2026-114938/cloud/tests/run-aws-tests.sh @@ -201,7 +201,7 @@ inst() { printf '{"InstanceId":"%s","InstanceType":"%s","Architecture":"%s","Tag apps() { printf '{"Entries":[{"Name":"bash","Version":"5.2"}%s]}' "${2:-}" > "$E/ssm.list-inventory-entries_$1.json"; } apps i-hot ',{"Name":"java-21-amazon-corretto-headless","Version":"1:21.0.5+11-1.amzn2023"},{"Name":"javapackages-filesystem","Version":"6.0.0"}' apps i-ud ',{"Name":"openjdk-17-jre-headless","Version":"17.0.13+11-1~22.04"}' -apps i-j8 ',{"Name":"java-1.8.0-amazon-corretto","Version":"1.8.0_432.b06-1"}' +apps i-j8 ',{"Name":"java-1.8.0-amazon-corretto","Version":"1.8.0_432.b06-1"},{"Name":"jdk-1.8-perf","Version":"1.8.0_471-perf"}' apps i-unk echo 'An error occurred (InvalidInstanceId) when calling the ListInventoryEntries operation: not managed' \ > "$E/ssm.list-inventory-entries_i-noinv.err" @@ -335,6 +335,8 @@ check_block "ec2 EKS nodes grouped, inventory denied" "ec2 us-east-1 eks:prod-k8 assert "denied inventory counted" "$(printf '%s\n' "$OUT" | grep -c '^note: 1 listing(s) denied')" = 1 check_block "ec2 java 8 -> OK" "ec2 us-east-1 i-j8 (j8) m7a.large java-1.8.0-amazon-corretto" \ "java version: 1.8.0_432 (< 17.0.6) OK" +check_block "ec2 java 8 EPP, JVM version not in inventory -> unknown" "ec2 us-east-1 i-j8 (j8) m7a.large jdk-1.8-perf" \ + "java version: 1.8.0_471-perf, Java 8 Enterprise Performance Pack, JVM version not visible [?]" "=> [?] unknown" check_block "ec2 unknown family" "ec2 us-east-1 i-unk (unk) zz9.large" \ "vm: no Java package in SSM inventory [?]" "avx-512: family not in table (zz9) [?]" grep -q 'i-arm\|i-old' "$FAKE_AWS_LOG"; result $? "ec2 ruled-out instances get no further calls" diff --git a/CVE-2026-114938/cloud/tests/run-gcp-tests.sh b/CVE-2026-114938/cloud/tests/run-gcp-tests.sh index 650e658..2a596d2 100755 --- a/CVE-2026-114938/cloud/tests/run-gcp-tests.sh +++ b/CVE-2026-114938/cloud/tests/run-gcp-tests.sh @@ -161,7 +161,8 @@ inv_desc hot1 us-central1-a '{"installed_packages":{"aptPackage":[ {"architecture":"all","packageName":"java-common","version":"0.75"}]},"system_information":{}}' inv_desc md1 us-central1-a '{"installed_packages":{"aptPackage":[{"packageName":"bash","version":"5.2"}]}}' inv_desc raw1 us-central1-a '{"name":"projects/demo-a/locations/us-central1-a/instances/401/inventory","items":{ - "a":{"installedPackage":{"aptPackage":{"packageName":"temurin-17-jdk","version":"17.0.13.0.0+11"}}}}}' + "a":{"installedPackage":{"aptPackage":{"packageName":"temurin-17-jdk","version":"17.0.13.0.0+11"}}}, + "b":{"installedPackage":{"yumPackage":{"packageName":"jdk-1.8-perf","version":"1.8.0_471-perf-17.0.17"}}}}}' for n in 1 2 3 4; do echo "ERROR: (gcloud.compute.os-config.inventories.describe) PERMISSION_DENIED: Permission 'osconfig.inventories.get' denied" \ > "$A/compute.os-config.inventories.describe.gke-prod-pool-${n}_us-central1-b.err" @@ -246,6 +247,9 @@ check_block "compute: unknown CPU, no inventory reported" "compute demo-a us-cen check_block "compute: OS Config off" "compute demo-a us-central1-d dis1 c3-standard-4" "vm: OS Config API not enabled [?]" check_block "compute: raw API inventory shape" "compute demo-a us-central1-a raw1 c4-standard-2 temurin-17-jdk" \ "java version: 17.0.13.0.0 [!]" "avx-512: vbmi+bw (Intel Emerald Rapids) [!]" "=> [!] impacted" +check_block "compute: java 8 EPP on JVM 17.0.17 -> impacted" "compute demo-a us-central1-a raw1 c4-standard-2 jdk-1.8-perf" \ + "vm: HotSpot (jdk-1.8-perf) [!]" \ + "java version: 1.8.0_471-perf-17.0.17, Java 8 Enterprise Performance Pack, JVM 17.0.17 [!]" "=> [!] impacted" b=$(printf '%s\n' "$OUT" | grep -c 'off1') assert "compute: stopped VM ignored" "$b" -eq 0 assert "compute: one inventory call per candidate VM, none for ruled-out VMs" \ @@ -315,7 +319,7 @@ done # The AWS and GCP scripts are standalone but must decide identically. fn_body() { awk -v f="$1" '$0 ~ "^"f"\\(\\) \\{" { on = 1 } on { print } on && /^}/ { exit }' "$2"; } drift="" -for f in ver_key is_fixed fix_matters beyond_checked ver_full ver_major ver_any eval_flags flags_check \ +for f in ver_key is_fixed fix_matters beyond_checked ver_full ver_major ver_any ver_epp ver_pkg eval_flags flags_check \ avx_check vm_class image_info begin_block chk note end_block; do a=$(fn_body "$f" "$HERE/../detect-jdk-8392044-aws.sh") g=$(fn_body "$f" "$S") diff --git a/CVE-2026-114938/linux/detect-jdk-8392044.sh b/CVE-2026-114938/linux/detect-jdk-8392044.sh index 3e84c42..1c5f6c4 100755 --- a/CVE-2026-114938/linux/detect-jdk-8392044.sh +++ b/CVE-2026-114938/linux/detect-jdk-8392044.sh @@ -236,6 +236,16 @@ ver_key() { MIN_KEY=$(ver_key 17.0.6) +# Oracle Java 8 Enterprise Performance Pack (EPP) runs a JDK 17 HotSpot JVM +# under the Java 8 class library. Its builds carry "-perf": java.version is +# "1.8.0_345" or "1.8.0_345-perf" and java.vm.version "17.0.4+1-perf-4711". +# The JDK 17 version, not 1.8.0, decides whether it is impacted. +# epp_jvm STRING: print the JDK 11+ version found in a -perf build string. +epp_jvm() { + case "$1" in *perf*) ;; *) return 0 ;; esac + grep -oE '(^|[^0-9.])(1[1-9]|[2-9][0-9])\.[0-9]+\.[0-9]+' <<<"$1" | head -1 | sed 's/^[^0-9]//' +} + is_fixed() { local k f fk top=0 k=$(ver_key "$1") @@ -288,7 +298,7 @@ flagval() { # FLAGS: space separated options from filter_flags probe() { local title=$1 prefix=$2 java=$3 flags=$4 - local h o1 o2 ver vm arch k useavx b64 comp tiered stop dis cpuline vbmi result + local h o1 o2 ver cver epp vm arch k useavx b64 comp tiered stop dis cpuline vbmi result local s_arch s_vm v_vm s_ver v_ver s_avx v_avx s_b64 v_b64 h=$(printf '%s|%s|%s' "$prefix" "$java" "$flags" | cksum | tr -c '0-9\n' _) @@ -320,15 +330,33 @@ probe() { *HotSpot*|*"Server VM"*|*"Client VM"*) s_vm=impacted ;; *) s_vm=unknown; v_vm="$vm (not recognized as HotSpot)" ;; esac - s_ver=impacted + # Java 8 EPP: check the JDK 17 JVM it runs on. + cver=$ver v_ver=$ver - k=$(ver_key "$ver") - if [ "$k" -lt "$MIN_KEY" ]; then - s_ver=ok; v_ver="$ver (< 17.0.6)" - elif is_fixed "$ver"; then - s_ver=ok; v_ver="$ver (fixed)" - elif beyond_checked "$ver"; then - s_ver=unknown; v_ver="$ver (newer than the releases checked on $CHECKED_ON)" + epp="" + case "$ver" in + 1.*) + case "$o1" in + *perf*) + epp=$(epp_jvm "$(prop "$o1" java.vm.version)") + [ -n "$epp" ] || epp=$(epp_jvm "$(grep perf <<<"$o1" | tr '\n' ' ')") + [ -n "$epp" ] || epp=unreadable ;; + esac ;; + esac + if [ -n "$epp" ] && [ "$epp" != unreadable ]; then + cver=$epp + v_ver="$ver (Java 8 Enterprise Performance Pack, JVM $epp)" + fi + s_ver=impacted + k=$(ver_key "$cver") + if [ "$epp" = unreadable ]; then + s_ver=unknown; v_ver="$ver (Java 8 Enterprise Performance Pack, JVM version unreadable)" + elif [ "$k" -lt "$MIN_KEY" ]; then + s_ver=ok; v_ver="$v_ver (< 17.0.6)" + elif is_fixed "$cver"; then + s_ver=ok; v_ver="$v_ver (fixed)" + elif beyond_checked "$cver"; then + s_ver=unknown; v_ver="$v_ver (newer than the releases checked on $CHECKED_ON)" fi s_avx=n/a; v_avx=- diff --git a/CVE-2026-114938/linux/tests/fake-java b/CVE-2026-114938/linux/tests/fake-java index f3b8bf6..d330898 100755 --- a/CVE-2026-114938/linux/tests/fake-java +++ b/CVE-2026-114938/linux/tests/fake-java @@ -2,16 +2,17 @@ # Fake java for exercising detect-jdk-8392044.sh decision logic on any # hardware. Emits the same shapes HotSpot prints for # -XshowSettings:properties, -Xlog:os+cpu and -XX:+PrintFlagsFinal. -# Knobs: FAKE_VER, FAKE_VM, FAKE_ARCH, FAKE_FEATURES, FAKE_NOCPULOG. +# Knobs: FAKE_VER, FAKE_VMVER, FAKE_VM, FAKE_ARCH, FAKE_FEATURES, FAKE_NOCPULOG. ver=${FAKE_VER:-17.0.9} +vmver=${FAKE_VMVER:-$ver} vm=${FAKE_VM:-OpenJDK 64-Bit Server VM} arch=${FAKE_ARCH:-amd64} feat=${FAKE_FEATURES:-cx8, cmov, avx, avx2, avx512f, avx512dq, avx512cd, avx512bw, avx512vl, avx512_vbmi2, avx512_vbmi} avx=3; b64=true; comp=true; stop=4; dis="" case " $* " in *-XshowSettings:properties*) - printf 'Property settings:\n java.version = %s\n java.vm.name = %s\n os.arch = %s\n\nopenjdk version "%s"\n' \ - "$ver" "$vm" "$arch" "$ver" >&2 + printf 'Property settings:\n java.version = %s\n java.vm.name = %s\n java.vm.version = %s\n os.arch = %s\n\nopenjdk version "%s"\n%s (build %s, mixed mode)\n' \ + "$ver" "$vm" "$vmver" "$arch" "$ver" "$vm" "$vmver" >&2 exit 0 ;; esac for a in "$@"; do diff --git a/CVE-2026-114938/linux/tests/run-tests.sh b/CVE-2026-114938/linux/tests/run-tests.sh index d76de93..fc2ed6b 100755 --- a/CVE-2026-114938/linux/tests/run-tests.sh +++ b/CVE-2026-114938/linux/tests/run-tests.sh @@ -124,6 +124,12 @@ run env FAKE_VER=17.0.5 "${F[@]}"; check "later tests not checked once ruled out run env FAKE_VER=17.0.6 "${F[@]}"; check "17.0.6 boundary -> impacted" 1 run env FAKE_VER=17.0.5 "${F[@]}"; check "17.0.5 -> ok" 0 "(< 17.0.6) OK" run env FAKE_VER=1.8.0_392 "${F[@]}"; check "1.8.0_392 -> ok" 0 "(< 17.0.6) OK" +run env FAKE_VER=1.8.0_392 FAKE_VMVER=25.392-b08 FAKE_VM="Java HotSpot(TM) 64-Bit Server VM" "${F[@]}"; check "Oracle 8 (not EPP) -> ok" 0 "java version: 1.8.0_392 (< 17.0.6) OK" +run env FAKE_VER=1.8.0_471 FAKE_VMVER=17.0.17+8-perf-LTS-12 FAKE_VM="Java HotSpot(TM) 64-Bit Server VM" "${F[@]}"; check "Java 8 EPP on 17.0.17 -> impacted" 1 "java version: 1.8.0_471 (Java 8 Enterprise Performance Pack, JVM 17.0.17) [!]" "base64 intrinsic: on [!]" +run env FAKE_VER=1.8.0_345-perf FAKE_VMVER=17.0.4+1-perf-4711 FAKE_VM="Java HotSpot(TM) 64-Bit Server VM" "${F[@]}"; check "Java 8 EPP on 17.0.4 -> ok" 0 "java version: 1.8.0_345-perf (Java 8 Enterprise Performance Pack, JVM 17.0.4) (< 17.0.6) OK" +run env FAKE_VER=1.8.0_511-perf FAKE_VMVER=17.0.22+5-perf-LTS-3 FAKE_VM="Java HotSpot(TM) 64-Bit Server VM" "${F[@]}"; check "Java 8 EPP newer than checked -> unknown" 2 "JVM 17.0.22) (newer than the releases checked on 2026-11-17) [?]" +run env FAKE_VER=1.8.0_471-perf FAKE_VMVER=25.471-b09 FAKE_VM="Java HotSpot(TM) 64-Bit Server VM" "${F[@]}"; check "Java 8 EPP, JVM version unreadable -> unknown" 2 "java version: 1.8.0_471-perf (Java 8 Enterprise Performance Pack, JVM version unreadable) [?]" +run env FAKE_VER=1.8.0_471 FAKE_VMVER=17.0.17+8-perf-LTS-12 FAKE_VM="Java HotSpot(TM) 64-Bit Server VM" JDK8392044_FIXED_IN="17.0.17 21.0.9" "${F[@]}"; check "Java 8 EPP with fixed JVM -> ok" 0 "JVM 17.0.17) (fixed) OK" run env FAKE_VER=27.0.1.0.3 "${F[@]}"; check "27.0.1.0.3 no fix list -> impacted" 1 run env FAKE_VER=21.0.13.0.3 "${F[@]}"; check "newest checked release -> impacted" 1 "java version: 21.0.13.0.3 [!]" run env FAKE_VER=21.0.14 "${F[@]}"; check "newer than checked -> unknown" 2 "java version: 21.0.14 (newer than the releases checked on 2026-11-17) [?]" "base64 intrinsic: on [!]" diff --git a/CVE-2026-114938/windows/Detect-Jdk8392044.ps1 b/CVE-2026-114938/windows/Detect-Jdk8392044.ps1 index 8d8b762..46b907a 100644 --- a/CVE-2026-114938/windows/Detect-Jdk8392044.ps1 +++ b/CVE-2026-114938/windows/Detect-Jdk8392044.ps1 @@ -232,6 +232,18 @@ function Get-VerKey([string]$Version) { $MinKey = Get-VerKey '17.0.6' +# Oracle Java 8 Enterprise Performance Pack (EPP) runs a JDK 17 HotSpot JVM +# under the Java 8 class library. Its builds carry "-perf": java.version is +# "1.8.0_345" or "1.8.0_345-perf" and java.vm.version "17.0.4+1-perf-4711". +# The JDK 17 version, not 1.8.0, decides whether it is impacted. +# Returns the JDK 11+ version found in a -perf build string, or ''. +function Get-EppJvm([string]$Text) { + if ($Text -notmatch 'perf') { return '' } + $m = [regex]::Match($Text, '(?:^|[^0-9.])((?:1[1-9]|[2-9][0-9])\.[0-9]+\.[0-9]+)') + if ($m.Success) { return $m.Groups[1].Value } + return '' +} + function Test-Fixed([string]$Version) { $k = Get-VerKey $Version $top = 0 @@ -360,10 +372,21 @@ function Invoke-Probe([string]$Title, [string]$JavaExe, [string[]]$Flags) { elseif ($vm -match 'Zing|Prime') { $sVm = 'unknown'; $vVm = "$vm (not HotSpot C2)" } elseif ($vm -match 'HotSpot|Server VM|Client VM') { $sVm = 'impacted' } else { $sVm = 'unknown'; $vVm = "$vm (not recognized as HotSpot)" } - $sVer = 'impacted'; $vVer = $ver - if ((Get-VerKey $ver) -lt $MinKey) { $sVer = 'ok'; $vVer = "$ver (< 17.0.6)" } - elseif (Test-Fixed $ver) { $sVer = 'ok'; $vVer = "$ver (fixed)" } - elseif (Test-BeyondChecked $ver) { $sVer = 'unknown'; $vVer = "$ver (newer than the releases checked on $CheckedOn)" } + # Java 8 EPP: check the JDK 17 JVM it runs on. + $cVer = $ver; $vVer = $ver; $epp = '' + if ($ver.StartsWith('1.') -and $o1 -match 'perf') { + $epp = Get-EppJvm (Get-Prop $o1 'java.vm.version') + if (-not $epp) { + $epp = Get-EppJvm ((@($o1 -split "`r?`n") -match 'perf') -join ' ') + } + if ($epp) { $cVer = $epp; $vVer = "$ver (Java 8 Enterprise Performance Pack, JVM $epp)" } + else { $epp = 'unreadable' } + } + $sVer = 'impacted' + if ($epp -eq 'unreadable') { $sVer = 'unknown'; $vVer = "$ver (Java 8 Enterprise Performance Pack, JVM version unreadable)" } + elseif ((Get-VerKey $cVer) -lt $MinKey) { $sVer = 'ok'; $vVer = "$vVer (< 17.0.6)" } + elseif (Test-Fixed $cVer) { $sVer = 'ok'; $vVer = "$vVer (fixed)" } + elseif (Test-BeyondChecked $cVer) { $sVer = 'unknown'; $vVer = "$vVer (newer than the releases checked on $CheckedOn)" } $sAvx = 'n/a'; $vAvx = '-' $sB64 = 'n/a'; $vB64 = '-' diff --git a/CVE-2026-114938/windows/tests/FakeJava.cs b/CVE-2026-114938/windows/tests/FakeJava.cs index d9ca251..8253d94 100644 --- a/CVE-2026-114938/windows/tests/FakeJava.cs +++ b/CVE-2026-114938/windows/tests/FakeJava.cs @@ -4,6 +4,7 @@ // // Environment knobs: // FAKE_VER java.version (default 17.0.9) +// FAKE_VMVER java.vm.version (default FAKE_VER) // FAKE_VM java.vm.name (default OpenJDK 64-Bit Server VM) // FAKE_ARCH os.arch (default amd64) // FAKE_FEATURES CPU feature list (default includes avx512_vbmi, avx512bw) @@ -23,6 +24,7 @@ static string Env(string name, string def) public static int Main(string[] args) { string ver = Env("FAKE_VER", "17.0.9"); + string vmver = Env("FAKE_VMVER", ver); string vm = Env("FAKE_VM", "OpenJDK 64-Bit Server VM"); string arch = Env("FAKE_ARCH", "amd64"); string feat = Env("FAKE_FEATURES", @@ -35,9 +37,11 @@ public static int Main(string[] args) Console.Error.WriteLine("Property settings:"); Console.Error.WriteLine(" java.version = " + ver); Console.Error.WriteLine(" java.vm.name = " + vm); + Console.Error.WriteLine(" java.vm.version = " + vmver); Console.Error.WriteLine(" os.arch = " + arch); Console.Error.WriteLine(""); Console.Error.WriteLine("openjdk version \"" + ver + "\""); + Console.Error.WriteLine(vm + " (build " + vmver + ", mixed mode)"); return 0; } } diff --git a/CVE-2026-114938/windows/tests/Run-Tests.ps1 b/CVE-2026-114938/windows/tests/Run-Tests.ps1 index e2c43cb..922d35d 100644 --- a/CVE-2026-114938/windows/tests/Run-Tests.ps1 +++ b/CVE-2026-114938/windows/tests/Run-Tests.ps1 @@ -101,6 +101,12 @@ Assert-Result 'multiple -Java paths in one argument' (Invoke-Detect @('-NoProces Assert-Result '17.0.6 boundary -> impacted' (Invoke-Detect $F @{ FAKE_VER = '17.0.6' }) 1 Assert-Result '17.0.5 -> ok' (Invoke-Detect $F @{ FAKE_VER = '17.0.5' }) 0 '(< 17.0.6) OK' Assert-Result '1.8.0_392 -> ok' (Invoke-Detect $F @{ FAKE_VER = '1.8.0_392' }) 0 '(< 17.0.6) OK' +Assert-Result 'Oracle 8 (not EPP) -> ok' (Invoke-Detect $F @{ FAKE_VER = '1.8.0_392'; FAKE_VMVER = '25.392-b08'; FAKE_VM = 'Java HotSpot(TM) 64-Bit Server VM' }) 0 'java version: 1.8.0_392 (< 17.0.6) OK' +Assert-Result 'Java 8 EPP on 17.0.17 -> impacted' (Invoke-Detect $F @{ FAKE_VER = '1.8.0_471'; FAKE_VMVER = '17.0.17+8-perf-LTS-12'; FAKE_VM = 'Java HotSpot(TM) 64-Bit Server VM' }) 1 'java version: 1.8.0_471 (Java 8 Enterprise Performance Pack, JVM 17.0.17) [!]' +Assert-Result 'Java 8 EPP on 17.0.4 -> ok' (Invoke-Detect $F @{ FAKE_VER = '1.8.0_345-perf'; FAKE_VMVER = '17.0.4+1-perf-4711'; FAKE_VM = 'Java HotSpot(TM) 64-Bit Server VM' }) 0 'java version: 1.8.0_345-perf (Java 8 Enterprise Performance Pack, JVM 17.0.4) (< 17.0.6) OK' +Assert-Result 'Java 8 EPP newer than checked -> unknown' (Invoke-Detect $F @{ FAKE_VER = '1.8.0_511-perf'; FAKE_VMVER = '17.0.22+5-perf-LTS-3'; FAKE_VM = 'Java HotSpot(TM) 64-Bit Server VM' }) 2 'JVM 17.0.22) (newer than the releases checked on 2026-11-17) [?]' +Assert-Result 'Java 8 EPP, JVM version unreadable -> unknown' (Invoke-Detect $F @{ FAKE_VER = '1.8.0_471-perf'; FAKE_VMVER = '25.471-b09'; FAKE_VM = 'Java HotSpot(TM) 64-Bit Server VM' }) 2 'java version: 1.8.0_471-perf (Java 8 Enterprise Performance Pack, JVM version unreadable) [?]' +Assert-Result 'Java 8 EPP with fixed JVM -> ok' (Invoke-Detect $F @{ FAKE_VER = '1.8.0_471'; FAKE_VMVER = '17.0.17+8-perf-LTS-12'; FAKE_VM = 'Java HotSpot(TM) 64-Bit Server VM'; JDK8392044_FIXED_IN = '17.0.17 21.0.9' }) 0 'JVM 17.0.17) (fixed) OK' Assert-Result '27.0.1.0.3 no fix list -> impacted' (Invoke-Detect $F @{ FAKE_VER = '27.0.1.0.3' }) 1 Assert-Result 'newest checked release -> impacted' (Invoke-Detect $F @{ FAKE_VER = '21.0.13.0.3' }) 1 'java version: 21.0.13.0.3 [!]' Assert-Result 'newer than checked -> unknown' (Invoke-Detect $F @{ FAKE_VER = '21.0.14' }) 2 'java version: 21.0.14 (newer than the releases checked on 2026-11-17) [?]'