-
Notifications
You must be signed in to change notification settings - Fork 826
10.1.x: Crash in SSL_read_early_data #12140
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
Comments
…pache#1043) This reverts commit 9355249. Reverting this commit avoids the following SSL_read_early_data crash: apache#12140
It's interesting that the crash happens in this OpenSSL call here: trafficserver/src/iocore/net/SSLUtils.cc Line 1092 in 2fc1735
I'm not sure why calling I verified that if I simplified the #11844 to this single line addition, I still get this crash: diff --git a/src/iocore/net/SSLUtils.cc b/src/iocore/net/SSLUtils.cc
index a71180fa2..47992de89 100644
--- a/src/iocore/net/SSLUtils.cc
+++ b/src/iocore/net/SSLUtils.cc
@@ -1077,6 +1077,8 @@ ssl_callback_info(const SSL *ssl, int where, int ret)
}
Metrics::Counter::increment(it->second);
}
+
+ SSL_get_negotiated_group(const_cast<SSL *>(ssl));
}
} Therefore simply calling |
Recent versions of OpenSSL define SSL_CB_HANDSHAKE_DONE as follows: > Callback has been called because a handshake is finished. It also > occurs if the handshake is paused to allow the exchange of early data. Calling SSL_get_negotiated_group duing early data situations was causing a crash. This moves the calling of SSL_get_negotiated_group to _record_tls_handshake_end_time where it will reliably not be called in the context of processing early data. Fixes: apache#12140
Recent versions of OpenSSL define SSL_CB_HANDSHAKE_DONE as follows: > Callback has been called because a handshake is finished. It also > occurs if the handshake is paused to allow the exchange of early data. Calling SSL_get_negotiated_group duing early data situations was causing a crash. This moves the calling of SSL_get_negotiated_group next to _record_tls_handshake_end_time where it will reliably not be called in the context of processing early data. Fixes: apache#12140
Recent versions of OpenSSL define SSL_CB_HANDSHAKE_DONE as follows: > Callback has been called because a handshake is finished. It also > occurs if the handshake is paused to allow the exchange of early data. Calling SSL_get_negotiated_group duing early data situations was causing a crash. This moves the calling of SSL_get_negotiated_group next to _record_tls_handshake_end_time where it will reliably not be called in the context of processing early data. Fixes: apache#12140
Recent versions of OpenSSL define SSL_CB_HANDSHAKE_DONE as follows: > Callback has been called because a handshake is finished. It also > occurs if the handshake is paused to allow the exchange of early data. Calling SSL_get_negotiated_group duing early data situations was causing a crash. This moves the calling of SSL_get_negotiated_group next to _record_tls_handshake_end_time where it will reliably not be called in the context of processing early data. Fixes: apache#12140
Recent versions of OpenSSL define SSL_CB_HANDSHAKE_DONE as follows: > Callback has been called because a handshake is finished. It also > occurs if the handshake is paused to allow the exchange of early data. Calling SSL_get_negotiated_group duing early data situations was causing a crash. This moves the calling of SSL_get_negotiated_group next to _record_tls_handshake_end_time where it will reliably not be called in the context of processing early data. Fixes: apache#12140
When testing 10.1.x on a production box, I'm seeing the following crash with some frequency:
Some possibly interesting early data variables:
For reference, I'm testing against 10.1.x commit:
After testing commits, I find that reverting #11844 stops this crash for us.
The text was updated successfully, but these errors were encountered: