'Java4Shell' Flaw Exposes OpenJDK to RCE via Base64 (calif.io) 18
Longtime Slashdot reader HnT writes: Security researchers at Calif have disclosed Java4Shell (CVE-2026-114938), a critical 9.2-rated memory-corruption bug in OpenJDK's AVX-512 Base64 decoder. By sending a malformed string ending in a stray = character, attackers can trigger an out-of-bounds heap write to leak sensitive memory or achieve pre-auth remote code execution on major platforms like Jira, Jenkins, and Keycloak. Although Calif says the vulnerability is difficult to exploit, Oracle released a critical patch update Tuesday, and CISA urged organizations to update immediately. OpenJDK's security advisory can be found here.
The Calif researchers warned that vulnerable systems could remain exposed for five to 10 years, given how slowly some organizations patch their infrastructure.
The Calif researchers warned that vulnerable systems could remain exposed for five to 10 years, given how slowly some organizations patch their infrastructure.
"memory-safe" (Score:3, Interesting)
Oops! Memory-safe except when you have handwritten SIMD code to accelerate base64 decoding.
Well, glad it's getting fixed anyhow.
Re: (Score:2)
I was going to say the same thing, but you beat me to it.
Certainly beclowns one of the biggest arguments for Java.
Re: (Score:2)
And if you are running older x86_64 cpu's that lack some of the newer AVX512 instructions (ex avx512vbmi) your are supposedly safe.
Re:"memory-safe" (Score:4, Insightful)
Certainly beclowns one of the biggest arguments for Java.
The argument is not complete immunity from memory-safety issues, but a far reduced scope in which they are relevant and in which the developer needs to take care of them.
There is no mainstream language that is 100% memory safe. All of them have at least some unsafe internals. The "memory safety guarantee" of the safe parts relies on the correctness of the unsafe internals they use.
As example, from The Rustonomicon [rust-lang.org]:
Much of the Rust standard library also uses Unsafe Rust internally. These implementations have generally been rigorously manually checked, so the Safe Rust interfaces built on top of these implementations can be assumed to be safe.
That assumption holds only as long as those Unsafe Rust internal uses are actually bug-free, which is not a 100% guarantee as bugs can slip through even the most rigorous checks. After all, even the OpenJDK's AVX-512 Base64 decoder was very likely "rigorously manually checked"...
What is true is that minimizing the unsafe parts reduces the attack surface and allows for more focused checks on those parts. This is still a very valid argument for Java compared to e.g. C/C++.
Re: (Score:1)
From Oracle: [oracle.com]
"The single biggest difference between Java and C or C++ is that Java's memory model eliminates the possibility of overwriting memory and corrupting data."
This was the early argument for Java, and they didn't hedge it like "well actually it's a far reduced scope." But also in the early days, there weren't clever optimizations for niche cases like base64 decode.
To give Java the benefit of the doubt and save face, one might say that it's an aspirational goal, not a bulletproof guarantee; or that t
Re: (Score:2)
From Oracle: [oracle.com] "The single biggest difference between Java and C or C++ is that Java's memory model eliminates the possibility of overwriting memory and corrupting data."
This was the early argument for Java, and they didn't hedge it like "well actually it's a far reduced scope."
That statement is under the assumption that the language itself is implemented correctly. This is not different from the Rustonomicon, which makes the same assumption about Rust.
This is from the first chapter of the Rustonomicon [rust-lang.org]:
Safe Rust is the true Rust programming language. If all you do is write Safe Rust, you will never have to worry about type-safety or memory-safety. You will never endure a dangling pointer, a use-after-free, or any other kind of Undefined Behavior (a.k.a. UB).
That is presented pretty clearly as "bulletproof guarantee", but it is actually only true under the assumption that Rust itself is implemented correctly.
Re: (Score:2)
The argument is not complete immunity from memory-safety issues, but a far reduced scope in which they are relevant and in which the developer needs to take care of them.
If they had written the base64 decoder in Java, it would not have this vulnerability. But no, they decided to optimized it by not using Java, so they got a serious bug. Why was it so important to write the decoder in another language? Isn't Java with JIT fast enough?
Re: (Score:2)
Why was it so important to write the decoder in another language? Isn't Java with JIT fast enough?
That's the kind of special case implementations you want as fast as possible. I doubt any mainstream language that takes performance seriously does it completely without unsafe internals either.
Re: "memory-safe" (Score:1)
Re: "memory-safe" (Score:2)
Absolutely not. Java guarantees that you can't write memory unsafe code in it. However, yes there can be problems within the implementation of the Java itself on any libraries that it uses if they're written with memory unsafe languages.
looks around (Score:2)
All I see is old hardware running Java 8.
The future's so bright I gotta wear shades.
TXkgdGhvdWdodHMgb24gdGhpcyB0b3BpYzo= (Score:2)
T0ggRlVDSyE=
Re: TXkgdGhvdWdodHMgb24gdGhpcyB0b3BpYzo= (Score:1)
You don't say :)
What is Java? (Score:2)
Is that like a fancy new compiler for Rust or Go? Never heard of it. /s
Iâ(TM)ve got an Arm CPU (Score:2)
You insensitive clod
Can't wait... (Score:2)
Re: Can't wait... (Score:2)
Speech4Shell will allow you to gain the root shell on a cloud server simply by talking with ChatGPT.