summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-05-14 15:33:40 +0100
committerMatt Caswell <matt@openssl.org>2021-05-17 10:36:03 +0100
commita227ff336fc934b4a52c4659ae423dfa10efd5f3 (patch)
tree573468fdd777c35a2aabb58591dcc3dd731a6f73 /include
parent55373bfd419ca010a15aac18c88c94827e2f3a92 (diff)
Fix a use-after-free in the child provider code
If the child provider context data gets cleaned up before all usage of providers has finished then a use-after-free can occur. We change the priority of this data so that it gets freed later. Fixes #15284 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15286)
Diffstat (limited to 'include')
-rw-r--r--include/internal/cryptlib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h
index d943419a52..966c8f26f1 100644
--- a/include/internal/cryptlib.h
+++ b/include/internal/cryptlib.h
@@ -168,6 +168,7 @@ typedef struct ossl_ex_data_global_st {
# define OSSL_LIB_CTX_CHILD_PROVIDER_INDEX 18
# define OSSL_LIB_CTX_MAX_INDEXES 19
+# define OSSL_LIB_CTX_METHOD_LOW_PRIORITY -1
# define OSSL_LIB_CTX_METHOD_DEFAULT_PRIORITY 0
# define OSSL_LIB_CTX_METHOD_PRIORITY_1 1
# define OSSL_LIB_CTX_METHOD_PRIORITY_2 2