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:
parent
67202973cf
commit
52a48f9eed
@ -1927,6 +1927,9 @@ static int ssl_scan_clienthello_tlsext(SSL *s, PACKET *pkt, int *al)
|
|||||||
if (!PACKET_get_net_2(pkt, &len))
|
if (!PACKET_get_net_2(pkt, &len))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
if (PACKET_remaining(pkt) != len)
|
||||||
|
goto err;
|
||||||
|
|
||||||
while (PACKET_get_net_2(pkt, &type) && PACKET_get_net_2(pkt, &size)) {
|
while (PACKET_get_net_2(pkt, &type) && PACKET_get_net_2(pkt, &size)) {
|
||||||
PACKET subpkt;
|
PACKET subpkt;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user