Java4Shell: RCE in OpenJDK when processing Base64
The gist
Security firm Calif disclosed Java4Shell, a heap buffer overflow in OpenJDK's Base64 decoder, on Nov 17.
Patches are out, but no public exploit or in-the-wild attacks are reported yet.
How it unfolded
- 2021The same Base64 decoder was added to mainline OpenJDK and first released in JDK 18.
- Nov 2022The AVX-512 Base64 decoding intrinsic (JDK-8268276) was backported to the JDK 17 update line.
- Jan 2023OpenJDK 17.0.6 shipped, the first release with the AVX-512 decoder in Java 17.
Key terms
- heap buffer overflow
- A software bug where a program writes more data into a memory buffer than it can hold, overwriting nearby memory.
- OpenJDK
- A free, open-source implementation of the Java Platform, Standard Edition and the official reference implementation of Java SE.
- Base64
- A binary-to-text encoding that uses 64 printable characters to represent binary data for transmission over text-only channels.
Source: Wikipedia