Someone reported java4shell bug in September 2026

Someone reported java4shell bug in September 2026

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

In StubGenerator::generate_base64_decodeBlock() (x86_64 AVX-512 VBMI path), L_finalBit handles 1-63 leftover bytes with a masked vector sequence that computes output_size = (len/4)*3. Valid inputs always have a length multiple of 4, so this bug triggers only on invalid inputs: with length < 4 (e.g. “A”.repeat(64)+”=” leaves 1 byte after L_process64Loop), output_size starts at 0 and the padding path decrements it below zero, producing a wrong output_mask. The stub stores past the logical output length before returning to Java, corrupting the heap.

在 StubGenerator::generate_base64_decodeBlock()(x86_64 AVX-512 VBMI 路径)中,L_finalBit 使用掩码向量序列处理 1-63 个剩余字节,该序列计算 output_size = (len/4)*3。有效输入的长度始终是 4 的倍数,因此该错误仅在无效输入时触发:当长度 < 4 时(例如 “A”.repeat(64)+”=” 在 L_process64Loop 后留下 1 个字节),output_size 从 0 开始,填充路径将其减至零以下,从而产生错误的 output_mask。存根在返回 Java 之前越过逻辑输出长度进行存储,导致堆损坏。

The suggested fix is to early-return to Java if length < 4.

建议的修复方法是如果长度 < 4,则提前返回 Java。

⚠️ Failed to retrieve information on issue 8392044. Please make sure it exists and is accessible.

⚠️ 无法检索有关问题 8392044 的信息。请确保该问题存在且可访问。

Checkout this PR locally: $ git fetch https://git.openjdk.org/jdk.git pull/32781/head:pull/32781 $ git checkout pull/32781

在本地检出此 PR: $ git fetch https://git.openjdk.org/jdk.git pull/32781/head:pull/32781 $ git checkout pull/32781

Update a local copy of the PR: $ git checkout pull/32781 $ git pull https://git.openjdk.org/jdk.git pull/32781/head

更新 PR 的本地副本: $ git checkout pull/32781 $ git pull https://git.openjdk.org/jdk.git pull/32781/head

Checkout this PR locally: $ git pr checkout 32781

在本地检出此 PR: $ git pr checkout 32781

View PR using the GUI difftool: $ git pr show -t 32781

使用 GUI difftool 查看 PR: $ git pr show -t 32781

Download this PR as a diff file: https://git.openjdk.org/jdk/pull/32781.diff

将此 PR 下载为 diff 文件: https://git.openjdk.org/jdk/pull/32781.diff

Sorry, something went wrong.

抱歉,出错了。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

👋 Welcome back ayang! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

👋 欢迎回来 ayang!将此 PR 合并到 master 所需条件的进度列表将添加到您的拉取请求正文中。此拉取请求还有其他可用的命令。

Sorry, something went wrong.

抱歉,出错了。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.

❗ 此更改尚未准备好集成。 请参阅描述中的进度检查表以了解自动化要求。

Sorry, something went wrong.

抱歉,出错了。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

@albertnetymk The following label will be automatically applied to this pull request:

@albertnetymk 以下标签将自动应用于此拉取请求:

When this pull request is ready to be reviewed, an “RFR” email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

当此拉取请求准备好进行审查时,将向相应的邮件列表发送一封“RFR”电子邮件。如果您想更改这些标签,请使用 /label 拉取请求命令。

Sorry, something went wrong.

抱歉,出错了。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot-compiler. This can be overridden with the /reviewers command.

基于此标签的存在:hotspot-compiler,此 PR 所需的审查总数已设置为 2。这可以通过 /reviewers 命令覆盖。

Sorry, something went wrong.

抱歉,出错了。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

@albertnetymk This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@albertnetymk 此拉取请求已超过 8 周处于非活动状态,如果再过 8 周仍无任何活动,它将被自动关闭。为避免这种情况,只需向拉取请求发出 /touch 或 /keepalive 命令即可。如果您在推动此拉取请求进行集成方面需要帮助,请随时寻求协助!

Sorry, something went wrong.

抱歉,出错了。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

@albertnetymk just curious, why was this closed?

@albertnetymk 只是好奇,为什么这个被关闭了?

Sorry, something went wrong.

抱歉,出错了。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

Hi @paul-civitas, thanks for making a comment in an OpenJDK project!

嗨 @paul-civitas,感谢您在 OpenJDK 项目中发表评论!

All comments and discussions in the OpenJDK Community must be made available under the OpenJDK Terms of Use. If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please Use “Add GitHub user paul-civitas” for the summary.

OpenJDK 社区中的所有评论和讨论都必须根据《OpenJDK 使用条款》提供。如果您已经是 OpenJDK 作者、提交者或审查者,请点击此处打开一个新问题,以便我们记录该事实。请使用“Add GitHub user paul-civitas”作为摘要。

If you are not an OpenJDK Author, Committer or Reviewer, simply check the box below to accept the OpenJDK Terms of Use for your comments.

如果您不是 OpenJDK 作者、提交者或审查者,只需勾选下方的复选框,即表示您接受《OpenJDK 使用条款》以发表评论。

Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.

一旦您接受了《OpenJDK 使用条款》,您的评论将自动恢复。

Sorry, something went wrong.

抱歉,出错了。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

This is the RCE isn’t it? And it was found in September?! https://calif.io/java4shell

这就是 RCE,对吧?而且它是在九月份发现的?! https://calif.io/java4shell

Why is there a Base64 decoder intrinsic in the first place instead of at least an internal vector BMI intrinsic with bounds checking and the problematic logic written in a Java wrapper around it?

为什么首先会有 Base64 解码器内部函数,而不是至少有一个带有边界检查的内部向量 BMI 内部函数,并将有问题的逻辑写在围绕它的 Java 包装器中?

Sorry, something went wrong.

抱歉,出错了。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

just curious, why was this closed?

只是好奇,为什么这个被关闭了?

It’s taken over by others. This issue is gone on master.

它被其他人接管了。这个问题在 master 分支上已经不存在了。

Sorry, something went wrong.

抱歉,出错了。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。

Successfully merging this pull request may close these issues.

成功合并此拉取请求可能会关闭这些问题。

There was an error while loading. Please reload this page.

加载时发生错误。请重新加载此页面。