Fix i2v_GENERAL_NAME to not assume NUL terminated strings
authorMatt Caswell <matt@openssl.org>
Wed, 18 Aug 2021 11:24:22 +0000 (12:24 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 24 Aug 2021 13:22:06 +0000 (14:22 +0100)
commitad6ac17489241574136b7d035f01f6175dd9c941
tree9b6a1daf281a7a659322da4651a30a838fe7415f
parented3f51ec7d2f8956bff7bedf99b65ff1595e02e8
Fix i2v_GENERAL_NAME 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_san.c
crypto/x509/v3_utl.c
include/crypto/x509.h