]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
ssl: reset state when breaking out of SSLV3_HANDSHAKE_PROTOCOL
authorPhilippe Antoine <contact@catenacyber.fr>
Fri, 18 Dec 2020 21:12:23 +0000 (22:12 +0100)
committerVictor Julien <victor@inliniac.net>
Sat, 27 Feb 2021 17:46:27 +0000 (18:46 +0100)
So that we cannot resumt it with corrupted values

(cherry picked from commit eb460cf78dadc874633a57571245acf2911a6b6e)

src/app-layer-ssl.c

index ba921db089694bca1f6e110f5c6e17b4852e3c6e..dd23d0b46b8afce34972965342b990fe867e25a6 100644 (file)
@@ -2377,6 +2377,8 @@ static int SSLv3Decode(uint8_t direction, SSLState *ssl_state,
                         ((ssl_state->flags & SSL_AL_FLAG_STATE_SERVER_HELLO) == 0)) {
                     /* do nothing */
                 } else {
+                    // if we started parsing this, we must stop
+                    ssl_state->curr_connp->hs_bytes_processed = 0;
                     break;
                 }
             }