Fix GENERAL_NAME_print to not assume NUL terminated strings
authorMatt Caswell <matt@openssl.org>
Wed, 18 Aug 2021 11:34:55 +0000 (12:34 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 24 Aug 2021 13:22:06 +0000 (14:22 +0100)
commitb2b3b9c9936b91315adc0f3254879cb2fd5ca2bd
tree1cd852641ff7d7ce5c8cbe7de68bc06aaa59fc5e
parent1747d4658b3830951068a6a6c1fa2b45c4731fb3
Fix GENERAL_NAME_print 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