]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
TLS: Fix AlertDescription for missing partial processing case
authorJouni Malinen <j@w1.fi>
Sat, 9 Feb 2019 23:08:07 +0000 (01:08 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 11 Feb 2019 00:35:29 +0000 (02:35 +0200)
tlsv1_record_receive() did not return error here and as such, &alert was
not set and must not be used. Report internal error instead to avoid use
of uninitialized memory.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/tls/tlsv1_server.c

index 07840d4fbd3bfcfd7bba33b78532f7f2cf118326..4759509e53ebbfc34260446ec90d6b71f0727b62 100644 (file)
@@ -164,7 +164,8 @@ u8 * tlsv1_server_handshake(struct tlsv1_server *conn,
                        /* need more data */
                        wpa_printf(MSG_DEBUG, "TLSv1: Partial processing not "
                                   "yet supported");
-                       tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL, alert);
+                       tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL,
+                                          TLS_ALERT_INTERNAL_ERROR);
                        goto failed;
                }
                ct = pos[0];