[openssl] OpenSSL_1_1_1-stable update

bernd.edlinger at hotmail.de bernd.edlinger at hotmail.de
Tue Jul 2 14:25:14 UTC 2019


The branch OpenSSL_1_1_1-stable has been updated
       via  42180a229e97b0bcbbe07aeadb3dcb7dc31cfdc4 (commit)
      from  261ec72d58af64327214a78ca1c54b169ad93c28 (commit)


- Log -----------------------------------------------------------------
commit 42180a229e97b0bcbbe07aeadb3dcb7dc31cfdc4
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date:   Mon Jul 1 09:41:47 2019 +0200

    Check for V_ASN1_BOOLEAN/V_ASN1_NULL in X509_ATTRIBUTE_get0_data
    
    The member value.ptr is undefined for those ASN1 types.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/9278)
    
    (cherry picked from commit 94f4d58a87eac9c6fe4cb46b998656bd6d6f03a5)

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

Summary of changes:
 crypto/x509/x509_att.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/crypto/x509/x509_att.c b/crypto/x509/x509_att.c
index 63895ef..65daa49 100644
--- a/crypto/x509/x509_att.c
+++ b/crypto/x509/x509_att.c
@@ -314,7 +314,9 @@ void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx,
     ttmp = X509_ATTRIBUTE_get0_type(attr, idx);
     if (!ttmp)
         return NULL;
-    if (atrtype != ASN1_TYPE_get(ttmp)) {
+    if (atrtype == V_ASN1_BOOLEAN
+            || atrtype == V_ASN1_NULL
+            || atrtype != ASN1_TYPE_get(ttmp)) {
         X509err(X509_F_X509_ATTRIBUTE_GET0_DATA, X509_R_WRONG_TYPE);
         return NULL;
     }


More information about the openssl-commits mailing list