From: Matt Caswell Date: Thu, 23 Feb 2017 12:36:35 +0000 (+0000) Subject: Disallow handshake messages in the middle of early_data X-Git-Tag: OpenSSL_1_1_1-pre1~2159 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=10109364bf0f07c393bd4283470f1bf57f31cecb;p=oweals%2Fopenssl.git Disallow handshake messages in the middle of early_data Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2737) --- diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c index 0f68ddf504..e6a84dfa7b 100644 --- a/ssl/statem/statem_srvr.c +++ b/ssl/statem/statem_srvr.c @@ -129,6 +129,12 @@ static int ossl_statem_server13_read_transition(SSL *s, int mt) break; case TLS_ST_OK: + /* + * Its never ok to start processing handshake messages in the middle of + * early data (i.e. before we've received the end of early data alert) + */ + if (s->early_data_state == SSL_EARLY_DATA_READING) + break; if (mt == SSL3_MT_KEY_UPDATE) { st->hand_state = TLS_ST_SR_KEY_UPDATE; return 1;