diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_pkt.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_pkt.c b/src/lib/libssl/ssl_pkt.c index e959ccaf2f..7f655adfe6 100644 --- a/src/lib/libssl/ssl_pkt.c +++ b/src/lib/libssl/ssl_pkt.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_pkt.c,v 1.44 2021/06/13 15:34:41 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_pkt.c,v 1.45 2021/06/29 18:43:49 jsing 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 | * |
| @@ -430,6 +430,16 @@ ssl3_get_record(SSL *s) | |||
| 430 | 430 | ||
| 431 | if (rr->length == 0) { | 431 | if (rr->length == 0) { |
| 432 | /* | 432 | /* |
| 433 | * Zero-length fragments are only permitted for application | ||
| 434 | * data, as per RFC 5246 section 6.2.1. | ||
| 435 | */ | ||
| 436 | if (rr->type != SSL3_RT_APPLICATION_DATA) { | ||
| 437 | SSLerror(s, SSL_R_BAD_LENGTH); | ||
| 438 | al = SSL_AD_UNEXPECTED_MESSAGE; | ||
| 439 | goto fatal_err; | ||
| 440 | } | ||
| 441 | |||
| 442 | /* | ||
| 433 | * CBC countermeasures for known IV weaknesses can legitimately | 443 | * CBC countermeasures for known IV weaknesses can legitimately |
| 434 | * insert a single empty record, so we allow ourselves to read | 444 | * insert a single empty record, so we allow ourselves to read |
| 435 | * once past a single empty record without forcing want_read. | 445 | * once past a single empty record without forcing want_read. |
