summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-12-05 14:37:26 +0100
committerMatt Caswell <matt@openssl.org>2017-12-06 15:56:28 +0100
commite1dd8fa00a1e06d27c8b024dac7657a8d8a9b451 (patch)
tree5288ab019865c624993b5341015215c81bd6f91e /ssl
parentFix bug in TLSv1.3 PSK processing (diff)
downloadopenssl-e1dd8fa00a1e06d27c8b024dac7657a8d8a9b451.tar.xz
openssl-e1dd8fa00a1e06d27c8b024dac7657a8d8a9b451.zip
Fix the check_fatal macro
The check_fatal macro is supposed to only be called if we are already expecting to be in the fatal state. The macro asserts that we are and puts us into the fatal state if not. This issue combined with the problem fixed in the previous commit meant that the fuzzer detected a crash at a point in the processing when we should have already been in the fatal state. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4847)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/statem/statem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c
index 0cacc4acb7..29660d59c4 100644
--- a/ssl/statem/statem.c
+++ b/ssl/statem/statem.c
@@ -135,7 +135,7 @@ void ossl_statem_fatal(SSL *s, int al, int func, int reason, const char *file,
#define check_fatal(s, f) \
do { \
if (!ossl_assert((s)->statem.in_init \
- || (s)->statem.state != MSG_FLOW_ERROR)) \
+ && (s)->statem.state == MSG_FLOW_ERROR)) \
SSLfatal(s, SSL_AD_INTERNAL_ERROR, (f), \
SSL_R_MISSING_FATAL); \
} while (0)