[openssl] master update
tomas at openssl.org
tomas at openssl.org
Fri Aug 6 15:32:22 UTC 2021
The branch master has been updated
via c2b94c0a15254ad8cb28d07ed7793e975ae6736f (commit)
from 08e9ff76001e8b3972c894e0c7cbc94b0d1efb63 (commit)
- Log -----------------------------------------------------------------
commit c2b94c0a15254ad8cb28d07ed7793e975ae6736f
Author: Tomas Mraz <tomas at openssl.org>
Date: Thu Aug 5 12:44:58 2021 +0200
Avoid freeing the conf lhashes in X509_V3_EXT*_add_conf
Fixes #16226
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16227)
-----------------------------------------------------------------------
Summary of changes:
crypto/x509/v3_conf.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/crypto/x509/v3_conf.c b/crypto/x509/v3_conf.c
index 9997595653..1c11d671b2 100644
--- a/crypto/x509/v3_conf.c
+++ b/crypto/x509/v3_conf.c
@@ -487,6 +487,7 @@ X509_EXTENSION *X509V3_EXT_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
return NULL;
CONF_set_nconf(ctmp, conf);
ret = X509V3_EXT_nconf(ctmp, ctx, name, value);
+ CONF_set_nconf(ctmp, NULL);
NCONF_free(ctmp);
return ret;
}
@@ -501,6 +502,7 @@ X509_EXTENSION *X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf,
return NULL;
CONF_set_nconf(ctmp, conf);
ret = X509V3_EXT_nconf_nid(ctmp, ctx, ext_nid, value);
+ CONF_set_nconf(ctmp, NULL);
NCONF_free(ctmp);
return ret;
}
@@ -542,6 +544,7 @@ int X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
return 0;
CONF_set_nconf(ctmp, conf);
ret = X509V3_EXT_add_nconf(ctmp, ctx, section, cert);
+ CONF_set_nconf(ctmp, NULL);
NCONF_free(ctmp);
return ret;
}
@@ -558,6 +561,7 @@ int X509V3_EXT_CRL_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
return 0;
CONF_set_nconf(ctmp, conf);
ret = X509V3_EXT_CRL_add_nconf(ctmp, ctx, section, crl);
+ CONF_set_nconf(ctmp, NULL);
NCONF_free(ctmp);
return ret;
}
@@ -574,6 +578,7 @@ int X509V3_EXT_REQ_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
return 0;
CONF_set_nconf(ctmp, conf);
ret = X509V3_EXT_REQ_add_nconf(ctmp, ctx, section, req);
+ CONF_set_nconf(ctmp, NULL);
NCONF_free(ctmp);
return ret;
}
More information about the openssl-commits
mailing list