diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/ssl_srvr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_srvr.c b/src/lib/libssl/ssl_srvr.c index c9c24f0453..72419dcf3a 100644 --- a/src/lib/libssl/ssl_srvr.c +++ b/src/lib/libssl/ssl_srvr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_srvr.c,v 1.73 2020/03/06 16:31:30 tb Exp $ */ | 1 | /* $OpenBSD: ssl_srvr.c,v 1.74 2020/05/09 13:51:44 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -834,6 +834,11 @@ ssl3_get_client_hello(SSL *s) | |||
834 | goto truncated; | 834 | goto truncated; |
835 | if (!CBS_get_u8_length_prefixed(&cbs, &session_id)) | 835 | if (!CBS_get_u8_length_prefixed(&cbs, &session_id)) |
836 | goto truncated; | 836 | goto truncated; |
837 | if (CBS_len(&session_id) > SSL3_SESSION_ID_SIZE) { | ||
838 | al = SSL_AD_ILLEGAL_PARAMETER; | ||
839 | SSLerror(s, SSL_R_SSL3_SESSION_ID_TOO_LONG); | ||
840 | goto f_err; | ||
841 | } | ||
837 | if (SSL_IS_DTLS(s)) { | 842 | if (SSL_IS_DTLS(s)) { |
838 | if (!CBS_get_u8_length_prefixed(&cbs, &cookie)) | 843 | if (!CBS_get_u8_length_prefixed(&cbs, &cookie)) |
839 | goto truncated; | 844 | goto truncated; |