Loosen MAX_PSK_ID_LEN check in TLSX_PopulateExtensions() to only server side #8302
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.
Description
This PR loosens up the session ticket size sanity check in
TLSX_PopulateExtensions()
to only occur on the server side. This check was originally added as part of a fix for CVE-2019-11873. That CVE was specific to wolfSSL behavior when on the server-side.This check interferes with stateless session resumption via session tickets with some non-wolfSSL server implementations that send large session tickets back. For example, Java >= 14 enables stateless session ticket resumption by default and puts the peer certificate into the encrypted session ticket sent back to the client. With the original sanity check in place, wolfSSL clients would fail a resumption attempt when building the ClientHello with the session ticket larger than
MAX_PSK_ID_LEN
.Fixes ZD #16908
Testing
Tested underneath wolfJSSE when connecting to and resuming against a SunJSSE-based TLS server (<= Java 14).
A separate test case will be added to wolfJSSE to test receiving a large session ticket from the server.
Checklist