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

Basic ssl-opt testing for TLS HS defragmentation #9887

Open
mpg opened this issue Jan 9, 2025 · 4 comments · May be fixed by #9928 or #9989
Open

Basic ssl-opt testing for TLS HS defragmentation #9887

mpg opened this issue Jan 9, 2025 · 4 comments · May be fixed by #9928 or #9989
Assignees
Labels
size-m Estimated task size: medium (~1w)

Comments

@mpg
Copy link
Contributor

mpg commented Jan 9, 2025

#9872 is currently in good shape except for the lack of automated tests (it was tested manually though and confirmed to resolve the issue). If the OP doesn't add automated tests, we'll add them ourselves.

Note: since we'll only have support for defragmenting incoming messages, not fragmenting outgoing, we'll need to use another implementation for testing - for example, openssl s_server -mtu <low_value> will fragment in TLS as well (see https://github.com/Mbed-TLS/mbedtls/pull/3817/files#diff-54a2261aca14ebb2491a1584cc3351a458487c23c25f90df08de2573cd705e32R9806 for example).

Note: if such tests are added 9872, then we can mark it as resolving this issue as well.

Edit: this issue is now only about basic testing, see this comment.

@mpg mpg added the size-s Estimated task size: small (~2d) label Jan 9, 2025
@mpg mpg moved this to 3.6.3 / 2.28.10 (final) release in Mbed TLS Epics Jan 9, 2025
@mpg mpg moved this from 3.6.3 / 2.28.10 (final) release to TLS 1.3 compatibility fix in Mbed TLS Epics Jan 9, 2025
@rojer
Copy link
Contributor

rojer commented Jan 9, 2025

some thoughts on testing: obviously this should be tested against widely used implementations such as openssl
but in my experience it's not sufficient. for example, the bug found while running older version of this code in the wild was against Amazon Greengrass, that for some reason decided to chop up messages in a weird way where record and message boundaries weren't lining up (to be clear, #9872 does not have this bug anymore).
so my idea of properly testing it involved writing a "record chopper" i/o proxy that would chop up messages into records of varying sizes, from 1 to N, or something like that.

@mpg
Copy link
Contributor Author

mpg commented Jan 13, 2025

Thanks for sharing your thoughts and experience! I think a "record chopper" would indeed be ideal for testing. However I'm afraid it is going to be more work than we can reasonably include in the upcoming 3.6.3 release.

In the short term, I think we'll probably have to be satisfied with testing against OpenSSL, but we can probably have a larger number of test cases than in #3817, with varying values of mtu - in particular, not just powers of 2 or multiples of 8 :)

@mpg
Copy link
Contributor Author

mpg commented Feb 12, 2025

Re-estimating size to M, as we had missed some of the testing needs, such as interactions with other TLS features such as renegotiation or buffer resizing.

@mpg
Copy link
Contributor Author

mpg commented Feb 17, 2025

Splitting testing into multiple issues:

@mpg mpg added size-m Estimated task size: medium (~1w) and removed size-s Estimated task size: small (~2d) labels Feb 17, 2025
@mpg mpg changed the title Add tests for Defragment incoming TLS handshake messages Basic ssl-opt testing for TLS HS defragmentation Feb 17, 2025
@minosgalanakis minosgalanakis linked a pull request Feb 17, 2025 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size-m Estimated task size: medium (~1w)
Projects
Status: TLS 1.3 compatibility fix
4 participants