Fix the ceiling on how much encryption growth we can have#19517
Closed
mattcaswell wants to merge 1 commit intoopenssl:openssl-3.1from
Closed
Fix the ceiling on how much encryption growth we can have#19517mattcaswell wants to merge 1 commit intoopenssl:openssl-3.1from
mattcaswell wants to merge 1 commit intoopenssl:openssl-3.1from
Conversation
Stitched ciphersuites can grow by more during encryption than the code allowed for. We fix the calculation and add an assert to check we go it right. Note that this is not a security issue. Even though we can overflow the amount of bytes reserved in the WPACKET for the encryption, the underlying buffer is still big enough.
Member
Author
|
Should we backport this to 1.1.1 as well? It's not strictly a security issue - but you could describe it as "hardening" which might mean we should put it in 1.1.1 also. |
hlandau
approved these changes
Oct 27, 2022
Member
|
I'd be OK for 1.1.1. |
paulidale
approved these changes
Oct 27, 2022
Collaborator
|
This pull request is ready to merge |
openssl-machine
pushed a commit
that referenced
this pull request
Nov 2, 2022
Stitched ciphersuites can grow by more during encryption than the code allowed for. We fix the calculation and add an assert to check we go it right. Note that this is not a security issue. Even though we can overflow the amount of bytes reserved in the WPACKET for the encryption, the underlying buffer is still big enough. Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from #19517)
openssl-machine
pushed a commit
that referenced
this pull request
Nov 2, 2022
Stitched ciphersuites can grow by more during encryption than the code allowed for. We fix the calculation and add an assert to check we go it right. Note that this is not a security issue. Even though we can overflow the amount of bytes reserved in the WPACKET for the encryption, the underlying buffer is still big enough. Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from #19517) (cherry picked from commit eaa2060)
Member
Author
|
I merged this to 3.1 and 3.0. There is a non-trivial cherry-pick conflict when taking this back to 1.1.1. I will create a separate PR for the 1.1.1 backport. |
2 tasks
Member
Author
|
Backport to 1.1.1 in #19585 |
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.
Stitched ciphersuites can grow by more during encryption than the code allowed for. We fix the calculation and add an assert to check we go it right.
Note that this is not a security issue. Even though we can overflow the amount of bytes reserved in the WPACKET for the encryption, the underlying buffer is still big enough.
Testing this is difficult. I would argue that the addition of the ossl_assert is sufficient for this. Adding a similar assert to 3.1 HEAD, but without the fix is enough to make the existing test suite fail.
This is a backport to 3.1/3.0 of one of the commits from #19516
Checklist