aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2024-04-20 19:12:50 +0000
committerEnji Cooper <ngie@FreeBSD.org>2024-04-21 16:35:19 +0000
commit42ce242e353065dfbaa248955f6657005a395a95 (patch)
tree0bbbd30aeffd5ae33f9bf11e0f40c639b9462513 /crypto
parentb571bcea5495327fd210378109b0b2aed08bebc3 (diff)
downloadsrc-42ce242e353065dfbaa248955f6657005a395a95.tar.gz
src-42ce242e353065dfbaa248955f6657005a395a95.zip
OpenSSL: use the upstream provided version.map files for the fips/legacy providers
This change introduces a static copy of the fips and legacy linker version maps generated by the OpenSSL 3.0.13 build process. This unbreaks the fips and legacy providers by not exposing unnecessary symbols from the fips/legacy provider shared objects shared with other providers (base, default) and libcrypto. More discussion: Prior to this change, loading the fips provider indirectly from a FreeBSD 14.0-CURRENT and 15.0-CURRENT host would result in a process-wide deadlock when invoking select OpenSSL APIs (CONF_modules_load* in this particular example). Speaking with the upstream maintainers [1], it became obvious that the FreeBSD base system was incorrectly building/linking the fips provider, resulting in a symbol collision at runtime, and thus a process-wide deadlock in specific circumstances. The fips provider would deadlock when trying to acquire a write lock on internal structures which should have only been available to the base and default providers, as certain preprocessor ifdefs only allow specific internal calls to be made with the base and default providers. 1. https://github.com/openssl/openssl/issues/24202 Differential Revision: https://reviews.freebsd.org/D44892
Diffstat (limited to 'crypto')
-rw-r--r--crypto/openssl/providers/fips.ld5
-rw-r--r--crypto/openssl/providers/legacy.ld5
2 files changed, 10 insertions, 0 deletions
diff --git a/crypto/openssl/providers/fips.ld b/crypto/openssl/providers/fips.ld
new file mode 100644
index 000000000000..1debaaa7ff65
--- /dev/null
+++ b/crypto/openssl/providers/fips.ld
@@ -0,0 +1,5 @@
+{
+ global:
+ OSSL_provider_init;
+ local: *;
+};
diff --git a/crypto/openssl/providers/legacy.ld b/crypto/openssl/providers/legacy.ld
new file mode 100644
index 000000000000..1debaaa7ff65
--- /dev/null
+++ b/crypto/openssl/providers/legacy.ld
@@ -0,0 +1,5 @@
+{
+ global:
+ OSSL_provider_init;
+ local: *;
+};