Repository navigation
Fix pipelining in 3.1/3.0 - #20208
Closed
mattcaswell wants to merge 5 commits into
Closed
mattcaswell wants to merge 5 commits into
mattcaswell wants to merge 5 commits into
Conversation
TLS pipelining provides the ability for libssl to read or write multiple records in parallel. It requires special ciphers to do this, and there are currently no built-in ciphers that provide this capability. However, the dasync engine does have such a cipher, so we add a test for this capability using that engine.
…lled The pipeline input/output buf arrays must remain accessible to the EVP_CIPHER_CTX until EVP_Cipher is subsequently called. This fixes an asan error discovered by the newly added pipeline test.
During read pipelining we must ensure that the buffer is sufficiently large to read enough data to fill our pipelines. We also remove some code that moved data to the start of the packet if we can. This was unnecessary because of later code which would end up moving it anyway. The earlier move was also incorrect in the case that |clearold| was 0. This would cause the read pipelining code to fail with sufficiently large records. Fixes openssl#20197
Document the effect on the internal read buffer when using pipelining.
We shouldn't be putting more data into a pipeline than the value of split_send_fragment. This is a backport of a fix which was included in a much larger commit in master (c618679) related to moving the pipelining code into the new record layer that exists there.
t8m
approved these changes
Feb 6, 2023
Member
Author
|
Ping for second review |
paulidale
reviewed
Feb 21, 2023
paulidale
approved these changes
Feb 22, 2023
hlandau
approved these changes
Feb 23, 2023
Collaborator
|
This pull request is ready to merge |
openssl-machine
pushed a commit
that referenced
this pull request
Feb 24, 2023
TLS pipelining provides the ability for libssl to read or write multiple records in parallel. It requires special ciphers to do this, and there are currently no built-in ciphers that provide this capability. However, the dasync engine does have such a cipher, so we add a test for this capability using that engine. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from #20208)
openssl-machine
pushed a commit
that referenced
this pull request
Feb 24, 2023
…lled The pipeline input/output buf arrays must remain accessible to the EVP_CIPHER_CTX until EVP_Cipher is subsequently called. This fixes an asan error discovered by the newly added pipeline test. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from #20208)
openssl-machine
pushed a commit
that referenced
this pull request
Feb 24, 2023
During read pipelining we must ensure that the buffer is sufficiently large to read enough data to fill our pipelines. We also remove some code that moved data to the start of the packet if we can. This was unnecessary because of later code which would end up moving it anyway. The earlier move was also incorrect in the case that |clearold| was 0. This would cause the read pipelining code to fail with sufficiently large records. Fixes #20197 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from #20208)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 13, 2023
We shouldn't be putting more data into a pipeline than the value of split_send_fragment. This is a backport of a fix which was included in a much larger commit in master (c618679) related to moving the pipelining code into the new record layer that exists there. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 2c4b1c7)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 16, 2023
TLS pipelining provides the ability for libssl to read or write multiple records in parallel. It requires special ciphers to do this, and there are currently no built-in ciphers that provide this capability. However, the dasync engine does have such a cipher, so we add a test for this capability using that engine. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 24c7d36)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 16, 2023
…lled The pipeline input/output buf arrays must remain accessible to the EVP_CIPHER_CTX until EVP_Cipher is subsequently called. This fixes an asan error discovered by the newly added pipeline test. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit df9c7ce)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 16, 2023
During read pipelining we must ensure that the buffer is sufficiently large to read enough data to fill our pipelines. We also remove some code that moved data to the start of the packet if we can. This was unnecessary because of later code which would end up moving it anyway. The earlier move was also incorrect in the case that |clearold| was 0. This would cause the read pipelining code to fail with sufficiently large records. Fixes openssl#20197 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 1d06598)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 16, 2023
We shouldn't be putting more data into a pipeline than the value of split_send_fragment. This is a backport of a fix which was included in a much larger commit in master (c618679) related to moving the pipelining code into the new record layer that exists there. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 2c4b1c7)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 19, 2023
TLS pipelining provides the ability for libssl to read or write multiple records in parallel. It requires special ciphers to do this, and there are currently no built-in ciphers that provide this capability. However, the dasync engine does have such a cipher, so we add a test for this capability using that engine. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 24c7d36)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 19, 2023
…lled The pipeline input/output buf arrays must remain accessible to the EVP_CIPHER_CTX until EVP_Cipher is subsequently called. This fixes an asan error discovered by the newly added pipeline test. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit df9c7ce)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 19, 2023
During read pipelining we must ensure that the buffer is sufficiently large to read enough data to fill our pipelines. We also remove some code that moved data to the start of the packet if we can. This was unnecessary because of later code which would end up moving it anyway. The earlier move was also incorrect in the case that |clearold| was 0. This would cause the read pipelining code to fail with sufficiently large records. Fixes openssl#20197 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 1d06598)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 19, 2023
We shouldn't be putting more data into a pipeline than the value of split_send_fragment. This is a backport of a fix which was included in a much larger commit in master (c618679) related to moving the pipelining code into the new record layer that exists there. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 2c4b1c7)
| goto end; | ||
|
|
||
| if (!TEST_true(SSL_set_cipher_list(clientssl, "AES128-SHA"))) | ||
| goto end; |
Member
There was a problem hiding this comment.
hmm, @mattcaswell, when any of these goto end are executed and idx == 5
then the statement below
if (idx == 5)
OPENSSL_free(msg);will crash, because msg is still initialized from above:
unsigned char *msg = (unsigned char *)
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123";
Member
There was a problem hiding this comment.
It would be better to report this as separate issue, or a PR with a fix. Comments in closed PRs often get lost/ignored.
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 21, 2023
TLS pipelining provides the ability for libssl to read or write multiple records in parallel. It requires special ciphers to do this, and there are currently no built-in ciphers that provide this capability. However, the dasync engine does have such a cipher, so we add a test for this capability using that engine. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 24c7d36)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 21, 2023
…lled The pipeline input/output buf arrays must remain accessible to the EVP_CIPHER_CTX until EVP_Cipher is subsequently called. This fixes an asan error discovered by the newly added pipeline test. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit df9c7ce)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 21, 2023
During read pipelining we must ensure that the buffer is sufficiently large to read enough data to fill our pipelines. We also remove some code that moved data to the start of the packet if we can. This was unnecessary because of later code which would end up moving it anyway. The earlier move was also incorrect in the case that |clearold| was 0. This would cause the read pipelining code to fail with sufficiently large records. Fixes openssl#20197 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 1d06598)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 21, 2023
We shouldn't be putting more data into a pipeline than the value of split_send_fragment. This is a backport of a fix which was included in a much larger commit in master (c618679) related to moving the pipelining code into the new record layer that exists there. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 2c4b1c7)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 1, 2023
TLS pipelining provides the ability for libssl to read or write multiple records in parallel. It requires special ciphers to do this, and there are currently no built-in ciphers that provide this capability. However, the dasync engine does have such a cipher, so we add a test for this capability using that engine. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 24c7d36)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 1, 2023
…lled The pipeline input/output buf arrays must remain accessible to the EVP_CIPHER_CTX until EVP_Cipher is subsequently called. This fixes an asan error discovered by the newly added pipeline test. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit df9c7ce)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 1, 2023
During read pipelining we must ensure that the buffer is sufficiently large to read enough data to fill our pipelines. We also remove some code that moved data to the start of the packet if we can. This was unnecessary because of later code which would end up moving it anyway. The earlier move was also incorrect in the case that |clearold| was 0. This would cause the read pipelining code to fail with sufficiently large records. Fixes openssl#20197 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 1d06598)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 1, 2023
We shouldn't be putting more data into a pipeline than the value of split_send_fragment. This is a backport of a fix which was included in a much larger commit in master (c618679) related to moving the pipelining code into the new record layer that exists there. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 2c4b1c7)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 19, 2023
TLS pipelining provides the ability for libssl to read or write multiple records in parallel. It requires special ciphers to do this, and there are currently no built-in ciphers that provide this capability. However, the dasync engine does have such a cipher, so we add a test for this capability using that engine. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 24c7d36)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 19, 2023
…lled The pipeline input/output buf arrays must remain accessible to the EVP_CIPHER_CTX until EVP_Cipher is subsequently called. This fixes an asan error discovered by the newly added pipeline test. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit df9c7ce)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 19, 2023
During read pipelining we must ensure that the buffer is sufficiently large to read enough data to fill our pipelines. We also remove some code that moved data to the start of the packet if we can. This was unnecessary because of later code which would end up moving it anyway. The earlier move was also incorrect in the case that |clearold| was 0. This would cause the read pipelining code to fail with sufficiently large records. Fixes openssl#20197 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 1d06598)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 19, 2023
We shouldn't be putting more data into a pipeline than the value of split_send_fragment. This is a backport of a fix which was included in a much larger commit in master (c618679) related to moving the pipelining code into the new record layer that exists there. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 2c4b1c7)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 21, 2023
TLS pipelining provides the ability for libssl to read or write multiple records in parallel. It requires special ciphers to do this, and there are currently no built-in ciphers that provide this capability. However, the dasync engine does have such a cipher, so we add a test for this capability using that engine. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 24c7d36)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 21, 2023
…lled The pipeline input/output buf arrays must remain accessible to the EVP_CIPHER_CTX until EVP_Cipher is subsequently called. This fixes an asan error discovered by the newly added pipeline test. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit df9c7ce)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 21, 2023
During read pipelining we must ensure that the buffer is sufficiently large to read enough data to fill our pipelines. We also remove some code that moved data to the start of the packet if we can. This was unnecessary because of later code which would end up moving it anyway. The earlier move was also incorrect in the case that |clearold| was 0. This would cause the read pipelining code to fail with sufficiently large records. Fixes openssl#20197 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 1d06598)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 21, 2023
We shouldn't be putting more data into a pipeline than the value of split_send_fragment. This is a backport of a fix which was included in a much larger commit in master (c618679) related to moving the pipelining code into the new record layer that exists there. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 2c4b1c7)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Sep 12, 2023
TLS pipelining provides the ability for libssl to read or write multiple records in parallel. It requires special ciphers to do this, and there are currently no built-in ciphers that provide this capability. However, the dasync engine does have such a cipher, so we add a test for this capability using that engine. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 24c7d36)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Sep 12, 2023
…lled The pipeline input/output buf arrays must remain accessible to the EVP_CIPHER_CTX until EVP_Cipher is subsequently called. This fixes an asan error discovered by the newly added pipeline test. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit df9c7ce)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Sep 12, 2023
During read pipelining we must ensure that the buffer is sufficiently large to read enough data to fill our pipelines. We also remove some code that moved data to the start of the packet if we can. This was unnecessary because of later code which would end up moving it anyway. The earlier move was also incorrect in the case that |clearold| was 0. This would cause the read pipelining code to fail with sufficiently large records. Fixes openssl#20197 Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 1d06598)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Sep 12, 2023
We shouldn't be putting more data into a pipeline than the value of split_send_fragment. This is a backport of a fix which was included in a much larger commit in master (c618679) related to moving the pipelining code into the new record layer that exists there. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#20208) (cherry picked from commit 2c4b1c7)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR backports the fixes to a number of pipelining bugs that were resolved in master recently to 3.1/3.0. It also adds a new test for the pipelining code which would have caught these issues.
It is mostly a backport of PR #19456, plus an additional fix which was included in a much larger commit in master (c618679) related to moving the pipelining code into the new record layer that exists there.
Fixes #20197