AI Weekly Malaysia

Back to items Summaries

Someone reported java4shell bug in September 2026

ID
48511
Status
summarized
Published
19 Nov 2026, 7:47 PM
Fetched
20 Nov 2026, 6:32 AM
Provider
Hacker News
Category
dev-community
Original URL
https://github.com/openjdk/jdk/pull/32781
Source URL
https://hnrss.org/best

Summary

Score
6.5
Created
20 Nov 2026, 6:33 AM
Tags
Audience
developers

What happened

OpenJDK PR #32781 (by albertnetymk, opened Sep 9 2026, now closed) describes a heap-corrupting bug in the x86_64 AVX-512 VBMI Base64 decode intrinsic: in StubGenerator::generate_base64_decodeBlock(), the L_finalBit path computes output_size = (len/4)*3, and for a leftover tail under 4 bytes the padding path decrements it below zero, producing a wrong output_mask so the stub writes past the logical output length before returning to Java. It only triggers on invalid input — the write-up's example is "A".repeat(64)+"=", which leaves 1 byte after L_process64Loop — since valid Base64 is always a multiple of 4. The proposed fix is a one-line early return to Java when length < 4; the HN thread drew 307 points and 82 comments, and the PR text itself does not name a CVE, a severity, or the 'java4shell' label used in the submission title.

Why it matters

If you run JVM services on AVX-512 VBMI hardware (Ice Lake / Sapphire Rapids / Zen 4-class x86_64) and decode attacker-supplied Base64, this is a case where malformed input causes memory corruption instead of a clean IllegalArgumentException — so length validation on your side (`s.length() % 4 == 0`) is worth adding in front of java.util.Base64 rather than trusting the decoder to fail safely. The PR is marked Closed, not merged, so don't assume a shipped JDK contains the fix: check your build's changelog before treating this as patched. The other concrete detail is the 'OpenJDK Interim AI Policy' confirmation line in the PR body — a signal that AI-assisted contributions to core JDK intrinsics are now arriving with their own review conventions.

Discussion angle

JVM intrinsics are native code that skips the safety net — should java.util.Base64 be required to reject non-multiple-of-4 input before it ever reaches a vector stub, and how many of your services actually run on AVX-512 VBMI hosts where this path is live?

Top