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

8277307: Pre shared key sent under both session_ticket and pre_shared_key extensions #8922

Closed
wants to merge 2 commits into from

Conversation

djelinski
Copy link
Member

@djelinski djelinski commented May 27, 2022

Session ticket extension should only contain pre-TLS1.3 stateless session tickets; it should not be used for sending TLS1.3 pre-shared keys.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8277307: Pre shared key sent under both session_ticket and pre_shared_key extensions

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8922

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented May 27, 2022

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

@openjdk openjdk bot changed the title 8277307 8277307: Pre shared key sent under both session_ticket and pre_shared_key extensions May 27, 2022
@openjdk
Copy link

openjdk bot commented May 27, 2022

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

  • security

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.

@openjdk openjdk bot added the security security-dev@openjdk.org label May 27, 2022
@djelinski djelinski marked this pull request as ready for review May 27, 2022 14:04
@openjdk openjdk bot added the rfr Pull request is ready for review label May 27, 2022
@mlbridge
Copy link

mlbridge bot commented May 27, 2022

Webrevs

Copy link
Contributor

@coffeys coffeys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@openjdk
Copy link

openjdk bot commented Jun 3, 2022

@djelinski This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8277307: Pre shared key sent under both session_ticket and pre_shared_key extensions

Reviewed-by: coffeys, ascarpino

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 166 new commits pushed to the master branch:

  • 7df48f9: 8287353: Use snippet tag instead of pre tag in Javadoc of InterruptedException
  • 32dd1ee: 8287967: Update golden test files after JDK-8287886
  • 45f1b72: 8287697: Limit auto vectorization to 32-byte vector on Cascade Lake
  • 39ec58b: 8287886: Further terminology updates to match JLS
  • 68c5957: 8287869: -XX:+AutoCreateSharedArchive doesn't work when JDK build is switched
  • bf439f8: 8287876: The recently de-problemlisted TestTitledBorderLeak test is unstable
  • b7a34f7: 8287927: ProblemList java/awt/GraphicsDevice/DisplayModes/UnknownRefrshRateTest.java on macosx-aarch64
  • 8e07839: 8285081: Improve XPath operators count accuracy
  • b12e7f1: 8279358: vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t003/TestDescription.java fails with usage tracker
  • 1aa87e0: 8287148: Avoid redundant HashMap.containsKey calls in ExtendedKeyCodes.getExtendedKeyCodeForChar
  • ... and 156 more: https://git.openjdk.java.net/jdk/compare/63eb0b7e8606dd9cd145e92eeeb744ff5b7be569...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 3, 2022
@ascarpino
Copy link
Contributor

The bug and the PR could have used a lot more description that the issue here is that 1.2 and 1.3 are enabled at the same time. such as via setEnabledProtocols(). At first I thought this bug was incorrect because 1.3 does not display a session_ticket extension as it is only supported in the code by 1.0-1.2. But with both enabled, it causes all the extensions to be enabled.

After thinking about it, this maybe the better way to fix this as the it a heterogeneous server environment, only sending 1.3 extension from the resumed TLS protocol may cause errors when talking to 1.2 server. So both extensions need to be enabled globally, but since we are resuming 1.3 state, the same state does not to be passed in a 1.2 connection. It should do a full handshake.

One could ask the reverse, if the resumption is from 1.2 should we be sending a 1.3 pre_shared_key extension.. But that can be for another bug I suppose.

@ascarpino
Copy link
Contributor

please make sure all jdk_security tests and tier1 tests pass before integrating

@djelinski
Copy link
Member Author

The bug and the PR could have used a lot more description that the issue here is that 1.2 and 1.3 are enabled at the same time.

As far as I can tell, 1.2 and 1.3 are both enabled by default.

One could ask the reverse, if the resumption is from 1.2 should we be sending a 1.3 pre_shared_key extension.. But that can be for another bug I suppose.

We are not sending pre_shared_key when resuming TLS 1.2

please make sure all jdk_security tests and tier1 tests pass before integrating

done. Thanks for reviewing!

@djelinski
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 8, 2022

Going to push as commit 4662e06.
Since your change was applied there have been 166 commits pushed to the master branch:

  • 7df48f9: 8287353: Use snippet tag instead of pre tag in Javadoc of InterruptedException
  • 32dd1ee: 8287967: Update golden test files after JDK-8287886
  • 45f1b72: 8287697: Limit auto vectorization to 32-byte vector on Cascade Lake
  • 39ec58b: 8287886: Further terminology updates to match JLS
  • 68c5957: 8287869: -XX:+AutoCreateSharedArchive doesn't work when JDK build is switched
  • bf439f8: 8287876: The recently de-problemlisted TestTitledBorderLeak test is unstable
  • b7a34f7: 8287927: ProblemList java/awt/GraphicsDevice/DisplayModes/UnknownRefrshRateTest.java on macosx-aarch64
  • 8e07839: 8285081: Improve XPath operators count accuracy
  • b12e7f1: 8279358: vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t003/TestDescription.java fails with usage tracker
  • 1aa87e0: 8287148: Avoid redundant HashMap.containsKey calls in ExtendedKeyCodes.getExtendedKeyCodeForChar
  • ... and 156 more: https://git.openjdk.java.net/jdk/compare/63eb0b7e8606dd9cd145e92eeeb744ff5b7be569...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 8, 2022
@openjdk openjdk bot closed this Jun 8, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 8, 2022
@openjdk
Copy link

openjdk bot commented Jun 8, 2022

@djelinski Pushed as commit 4662e06.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@bradfordwetmore
Copy link
Contributor

A little late to this review as it's already been pushed, but I would have suggested leaving the return new SessionTicketSpec().getEncoded(); as it keeps the encapsulation more clear. Otherwise, it looks good.

@djelinski djelinski deleted the stateless-ticket branch October 20, 2022 11:02
@raycoll
Copy link

raycoll commented Apr 20, 2023

Hi @raycoll, thanks for making a comment in an OpenJDK project!

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 raycoll for the summary.

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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated security security-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

5 participants