Fix a use-after-free in the child provider code
authorMatt Caswell <matt@openssl.org>
Fri, 14 May 2021 14:33:40 +0000 (15:33 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 17 May 2021 09:36:03 +0000 (10:36 +0100)
commita227ff336fc934b4a52c4659ae423dfa10efd5f3
tree573468fdd777c35a2aabb58591dcc3dd731a6f73
parent55373bfd419ca010a15aac18c88c94827e2f3a92
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)
crypto/provider_child.c
include/internal/cryptlib.h