]> git.ipfire.org Git - thirdparty/hostap.git/commit
TLS: Fix ASN.1 parsing with no room for the header
authorJouni Malinen <j@w1.fi>
Sat, 9 Feb 2019 23:34:24 +0000 (01:34 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 11 Feb 2019 00:35:29 +0000 (02:35 +0200)
commit3eae9766b7e3aee20f6e6828e1468d244635f451
tree61439da5a742fb017256fa4ffe55f9ba186e73e0
parentfbc2123a14319035b36f493af7584200f6169244
TLS: Fix ASN.1 parsing with no room for the header

Explicitly check the remaining buffer length before trying to read the
ASN.1 header values. Attempt to parse an ASN.1 header when there was not
enough buffer room for it would have started by reading one or two
octets beyond the end of the buffer before reporting invalid data at the
following explicit check for buffer room.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/tls/asn1.c