Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8273108: RunThese24H crashes with SEGV in markWord::displaced_mark_helper() after JDK-8268276 #6786

Closed
wants to merge 2 commits into from

Conversation

asgibbons
Copy link
Contributor

@asgibbons asgibbons commented Dec 9, 2021

The base64 decoder overwrites memory past the end of its output buffer in certain cases. It will not overwrite if the encoded string length is < 64 bytes. It also will not overwrite if the encoded string length mod 64 is >= 16. So the case where it will overwrite is when the input string length (the encoded byte length) mod 64 is less than 16.

I also added a test case to detect this overrun.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issues

  • JDK-8273108: RunThese24H crashes with SEGV in markWord::displaced_mark_helper() after JDK-8268276
  • JDK-8275427: RunThese24H.java failed with EXCEPTION_ACCESS_VIOLATION in java.util.ArrayList.add
  • JDK-8272809: JFR thread sampler SI_KERNEL SEGV in metaspace::VirtualSpaceList::contains

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6786/head:pull/6786
$ git checkout pull/6786

Update a local copy of the PR:
$ git checkout pull/6786
$ git pull https://git.openjdk.java.net/jdk pull/6786/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6786

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6786.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Dec 9, 2021

👋 Welcome back asgibbons! 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.

@asgibbons
Copy link
Contributor Author

@asgibbons asgibbons commented Dec 9, 2021

/solves 8275427

@asgibbons
Copy link
Contributor Author

@asgibbons asgibbons commented Dec 9, 2021

/label hotspot

@openjdk
Copy link

@openjdk openjdk bot commented Dec 9, 2021

@asgibbons
Adding additional issue to solves list: 8275427: RunThese24H.java failed with EXCEPTION_ACCESS_VIOLATION in java.util.ArrayList.add.

@openjdk openjdk bot added the hotspot label Dec 9, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Dec 9, 2021

@asgibbons
The hotspot label was successfully added.

@asgibbons asgibbons changed the title 8273108: Fix SEGV. Base64Decode overruns output buffer 8273108: RunThese24H crashes with SEGV in markWord::displaced_mark_helper() after JDK-8268276 Dec 9, 2021
@asgibbons
Copy link
Contributor Author

@asgibbons asgibbons commented Dec 9, 2021

/label hotspot-compiler

@asgibbons asgibbons marked this pull request as ready for review Dec 9, 2021
@openjdk openjdk bot added the hotspot-compiler label Dec 9, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Dec 9, 2021

@asgibbons
The hotspot-compiler label was successfully added.

@openjdk openjdk bot added the rfr label Dec 9, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Dec 9, 2021

Webrevs

@asgibbons
Copy link
Contributor Author

@asgibbons asgibbons commented Dec 9, 2021

/solves JDK-8275427

@openjdk
Copy link

@openjdk openjdk bot commented Dec 9, 2021

@asgibbons
Updating description of additional solved issue: 8275427: RunThese24H.java failed with EXCEPTION_ACCESS_VIOLATION in java.util.ArrayList.add.

@asgibbons
Copy link
Contributor Author

@asgibbons asgibbons commented Dec 9, 2021

/solves 8272809

@openjdk
Copy link

@openjdk openjdk bot commented Dec 9, 2021

@asgibbons
Adding additional issue to solves list: 8272809: JFR thread sampler SI_KERNEL SEGV in metaspace::VirtualSpaceList::contains.

@sviswa7
Copy link

@sviswa7 sviswa7 commented Dec 10, 2021

@asgibbons The change looks good to me. Could you please create this PR versus JDK 18 (https://github.com/openjdk/jdk18).

@vnkozlov
Copy link
Contributor

@vnkozlov vnkozlov commented Dec 10, 2021

Yes, new PR have to be filed based on jdk18 repo pointed by Sandhya because we need to fix it in JDK 18. After integration the fix will be automatically pushed into JDK 19 (current repo).

@asgibbons
Copy link
Contributor Author

@asgibbons asgibbons commented Dec 10, 2021

I just created a PR (openjdk/jdk18#4) on the jdk-18 branch. Thanks for the heads-up,

@asgibbons
Copy link
Contributor Author

@asgibbons asgibbons commented Dec 10, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Dec 10, 2021

@asgibbons This pull request has not yet been marked as ready for integration.

@TobiHartmann
Copy link
Member

@TobiHartmann TobiHartmann commented Dec 13, 2021

As Vladimir mentioned, the fix will be forward ported to JDK 19 automatically. This PR should be closed without integration.

@asgibbons
Copy link
Contributor Author

@asgibbons asgibbons commented Dec 13, 2021

Thank you, @TobiHartmann. Closing this PR now.

@asgibbons asgibbons closed this Dec 13, 2021
@asgibbons asgibbons deleted the asgibbons-b64-bugfix branch Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-compiler rfr
4 participants