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
OpenSSL 1.1.0 hangs (CPU pegged) when SSL_peek is used with TLSv1 #1563
Comments
levitte
pushed a commit
that referenced
this issue
Sep 22, 2016
If while calling SSL_peek() we read an empty record then we go into an infinite loop, continually trying to read data from the empty record and never making any progress. This could be exploited by a malicious peer in a Denial Of Service attack. CVE-2016-6305 GitHub Issue #1563 Reviewed-by: Rich Salz <rsalz@openssl.org>
levitte
pushed a commit
that referenced
this issue
Sep 22, 2016
If while calling SSL_peek() we read an empty record then we go into an infinite loop, continually trying to read data from the empty record and never making any progress. This could be exploited by a malicious peer in a Denial Of Service attack. CVE-2016-6305 GitHub Issue #1563 Reviewed-by: Rich Salz <rsalz@openssl.org>
agl
pushed a commit
to google/boringssl
that referenced
this issue
Sep 22, 2016
SSL_peek works fine for us, but OpenSSL 1.1.0 regressed this (openssl/openssl#1563), and we don't have tests either. Fix this. SSL_peek can handle all weird events that SSL_read can, so use runner and tell bssl_shim to do a SSL_peek + SSL_peek + SSL_read instead of SSL_read. Then add tests for all the events we may discover. Change-Id: I9e8635e3ca19653a02a883f220ab1332d4412f98 Reviewed-on: https://boringssl-review.googlesource.com/11090 Reviewed-by: Adam Langley <agl@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code to reproduce:
Reproduces 100% reliably for me. Switching
SSL_peektoSSL_readfixes it, and switchingTLSv1_methodtoTLS_methodorTLSv1_1_methodalso fixes it.Therefore I believe, but have not confirmed, that https://github.com/openssl/openssl/blob/master/ssl/record/rec_layer_s3.c#L1120-L1144 is the loop that's spinning.
Demonstration of what this looke like:
The text was updated successfully, but these errors were encountered: