Reject NewSessionTicket messages with empty tickets in TLS 1.3 #2367
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In TLS 1.2, the ticket field could be empty to indicate the server changed its mind on sending a ticket, having previously committed to sending a NewSessionTicket message a round-trip ago.
In TLS 1.3, the server does not commit to sending NewSessionTicket. It can always just not send it. So the ticket field is required to be non-empty.
It's important we enforce this on the client because otherwise we produce a mixed up SSL_SESSION object that looks like an ID session (thanks to the placeholder ID field that was added for a still unfixed Envoy bug, see b/200292207). That, in turn, confuses some code in assembling the next ClientHello.
The subsequent CL will tighten that up.
Update-Note: BoringSSL TLS 1.3 clients will now correctly reject zero-length tickets, rather than letting servers get us into a slightly funny state.
Change-Id: I1651e7887f9611ebc44ac54af89c85bf86a9feff
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/73007
Commit-Queue: David Benjamin [email protected]
Auto-Submit: David Benjamin [email protected]
Reviewed-by: Adam Langley [email protected]
Issues:
Resolves #ISSUE-NUMBER1
Addresses #ISSUE-NUMBER2
Description of changes:
Describe AWS-LC’s current behavior and how your code changes that behavior. If there are no issues this pr is resolving, explain why this change is necessary.
Call-outs:
Point out areas that need special attention or support during the review process. Discuss architecture or design changes.
Testing:
How is this change tested (unit tests, fuzz tests, etc.)? Are there any testing steps to be verified by the reviewer?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.