]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Disallow ASN.1 enumerated types to be treated as strings.
authorPauli <pauli@openssl.org>
Tue, 6 Apr 2021 00:23:12 +0000 (10:23 +1000)
committerPauli <pauli@openssl.org>
Wed, 7 Apr 2021 13:29:10 +0000 (23:29 +1000)
They are actually integers.

Problem reported by: Scott McPeak <scott.g.mcpeak@gmail.com>

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14774)

crypto/asn1/tasn_dec.c

index 0987c2ece3633f6eab96ea0a3ac9852f7e479fff..00a76cc825aa1b59840967a398cd79fe8f0018b4 100644 (file)
@@ -66,7 +66,7 @@ static const unsigned long tag2bit[32] = {
     /* tags  4- 7 */
     B_ASN1_OCTET_STRING, 0, 0, B_ASN1_UNKNOWN,
     /* tags  8-11 */
-    B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN,
+    B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, 0, B_ASN1_UNKNOWN,
     /* tags 12-15 */
     B_ASN1_UTF8STRING, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN,
     /* tags 16-19 */