[openssl] OpenSSL_1_1_1-stable update

Dr. Paul Dale pauli at openssl.org
Mon Sep 13 07:04:23 UTC 2021


The branch OpenSSL_1_1_1-stable has been updated
       via  9e44ffc281326330937eee0e94b6fd4bfcaa98eb (commit)
      from  2753b6ff7f0b91c7ddeb72a6a08948ca28d12a91 (commit)


- Log -----------------------------------------------------------------
commit 9e44ffc281326330937eee0e94b6fd4bfcaa98eb
Author: Nikita Ivanov <nivanov at cloudlinux.com>
Date:   Tue Sep 7 11:31:17 2021 +0300

    Fix nc_email to check ASN1 strings with NULL byte in the middle
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16524)
    
    (cherry picked from commit 485d0790ac1a29a0d4e7391d804810d485890376)

-----------------------------------------------------------------------

Summary of changes:
 crypto/x509v3/v3_ncons.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/crypto/x509v3/v3_ncons.c b/crypto/x509v3/v3_ncons.c
index d985aa91da..60cb4ceaa8 100644
--- a/crypto/x509v3/v3_ncons.c
+++ b/crypto/x509v3/v3_ncons.c
@@ -602,6 +602,9 @@ static int nc_email(ASN1_IA5STRING *eml, ASN1_IA5STRING *base)
         if (baseat != baseptr) {
             if ((baseat - baseptr) != (emlat - emlptr))
                 return X509_V_ERR_PERMITTED_VIOLATION;
+            if (memchr(baseptr, 0, baseat - baseptr) ||
+                memchr(emlptr, 0, emlat - emlptr))
+                return X509_V_ERR_UNSUPPORTED_NAME_SYNTAX;
             /* Case sensitive match of local part */
             if (strncmp(baseptr, emlptr, emlat - emlptr))
                 return X509_V_ERR_PERMITTED_VIOLATION;


More information about the openssl-commits mailing list