Validate ClientHello extension field length

RT#4069

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
Alessandro Ghedini 2015-10-02 13:43:29 +02:00 committed by Matt Caswell
parent 67202973cf
commit 52a48f9eed

View File

@ -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;