Fix the name constraints code to not assume NUL terminated strings
authorMatt Caswell <matt@openssl.org>
Wed, 18 Aug 2021 16:08:58 +0000 (17:08 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 24 Aug 2021 13:22:06 +0000 (14:22 +0100)
commitd2015a783e64613d8e4a142fa05048d1863df944
treecefca15215599eb32a6ef5eb2afbcc63b663cb58
parent918430ba80d94ec8f05383b43b1872b1ebb13e1a
Fix the name constraints code to not assume NUL terminated strings

ASN.1 strings may not be NUL terminated. Don't assume they are.

CVE-2021-3712

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: David Benjamin <davidben@google.com>
crypto/x509/v3_ncons.c