Skip to content

Conversation

dcooper16
Copy link
Collaborator

As described in #1113, some servers will fail if the length of the ClientHello message is 522, 778, 1034, ... bytes (i.e., if length mod 256 = 10) or 526, 782, 1038, ... bytes (i.e., if length mod 256 = 14). This commit avoid this issue for normal testing by adding a 5-byte padding extension to the message if the length would otherwise be one of these lengths.

@dcooper16 dcooper16 force-pushed the avoid_clienthello_size_bug branch 2 times, most recently from 85f0223 to 4cbf52a Compare September 14, 2018 14:29
dcooper16 pushed a commit to dcooper16/testssl.sh that referenced this pull request Sep 14, 2018
socksend_tls_clienthello() does not calculate the length of the ClientHello message in the case of a TLS 1.3 ClientHello, since it does not take into account the inclusion of a 32-byte session id. The length value that is being calculated incorrectly is only used to determine whether to include a padding extension, and if so, how long that extension should be.

This fix was previously included as part of PR testssl#1120, since a correct length calculation is needed to avoid a ClientHello length such that length mod 256 = 10, but I removed it from that PR and am making it a separate PR, since it is a bug that should be fixed even if testssl#1120 isn't adopted.
dcooper16 pushed a commit to dcooper16/testssl.sh that referenced this pull request Sep 14, 2018
socksend_tls_clienthello() does not calculate the length of the ClientHello message in the case of a TLS 1.3 ClientHello, since it does not take into account the inclusion of a 32-byte session id. The length value that is being calculated incorrectly is only used to determine whether to include a padding extension, and if so, how long that extension should be.

This fix was previously included as part of PR testssl#1120, since a correct length calculation is needed to avoid a ClientHello length such that length mod 256 = 10, but I removed it from that PR and am making it a separate PR, since it is a bug that should be fixed even if testssl#1120 isn't adopted.
dcooper16 pushed a commit to dcooper16/testssl.sh that referenced this pull request Sep 14, 2018
socksend_tls_clienthello() does not calculate the length of the ClientHello message in the case of a TLS 1.3 ClientHello, since it does not take into account the inclusion of a 32-byte session id. The length value that is being calculated incorrectly is only used to determine whether to include a padding extension, and if so, how long that extension should be.

This fix was previously included as part of PR testssl#1120, since a correct length calculation is needed to avoid a ClientHello length such that length mod 256 = 10, but I removed it from that PR and am making it a separate PR, since it is a bug that should be fixed even if testssl#1120 isn't adopted.
As described in testssl#1113, some servers will fail if the length of the ClientHello message is 522, 778, 1034, ... bytes (i.e., if length mod 256 = 10) or 526, 782, 1038, ... bytes (i.e., if length mod 256 = 14). This commit avoid this issue for normal testing by adding a 5-byte padding extension to the message if the length would otherwise be one of these lengths.
@dcooper16 dcooper16 force-pushed the avoid_clienthello_size_bug branch from 4cbf52a to bc3a812 Compare September 14, 2018 20:24
@drwetter drwetter merged commit d7e9794 into testssl:2.9dev Sep 17, 2018
@drwetter
Copy link
Collaborator

Thanks!

@dcooper16 dcooper16 deleted the avoid_clienthello_size_bug branch September 17, 2018 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants