Duplicate the file and func error strings
authorMatt Caswell <matt@openssl.org>
Mon, 15 Feb 2021 16:59:43 +0000 (16:59 +0000)
committerMatt Caswell <matt@openssl.org>
Wed, 24 Feb 2021 12:13:38 +0000 (12:13 +0000)
commitde4a88a979193e1f28c65c1f902828dd91d10ba5
tree3209c5536fc6c849eb83d61385746b15dc08f190
parentb0001d0cf2539b9309712e3e04f407dcbb04352c
Duplicate the file and func error strings

Errors raised from a provider that is subsequently unloaded from memory
may have references to strings representing the file and function that
are no longer present because the provider is no longer in memory. This
can cause crashes. To avoid this we duplicate the file and func strings.

Fixes #13623

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14213)
crypto/err/err.c
crypto/err/err_local.h
include/openssl/err.h.in