From: Alessandro Ghedini Date: Fri, 2 Oct 2015 11:43:29 +0000 (+0200) Subject: Validate ClientHello extension field length X-Git-Tag: OpenSSL_1_1_0-pre1~463 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=52a48f9eed73503c691056b5832b3eb04b95ea00;p=oweals%2Fopenssl.git Validate ClientHello extension field length RT#4069 Reviewed-by: Emilia Käsper Reviewed-by: Matt Caswell --- diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index aeae5b0cba..4975c10853 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -1927,6 +1927,9 @@ static int ssl_scan_clienthello_tlsext(SSL *s, PACKET *pkt, int *al) if (!PACKET_get_net_2(pkt, &len)) goto err; + if (PACKET_remaining(pkt) != len) + goto err; + while (PACKET_get_net_2(pkt, &type) && PACKET_get_net_2(pkt, &size)) { PACKET subpkt;