[openssl/openssl] 05e53a: providers/defltprov.c: remove static globals from ...
"'nikolapajkovsky' via openssl-commits" <[email protected]>
| Newsgroups | gmane.comp.encryption.openssl.cvs |
|---|---|
| Message-ID | <openssl/openssl/push/refs/heads/openssl-3.6/[email protected]> |
Branch: refs/heads/openssl-3.6
Home: https://github.com/openssl/openssl
Commit: 05e53af41acb2ea8374f59e991eec11ab9612323
https://github.com/openssl/openssl/commit/05e53af41acb2ea8374f59e991eec11ab9612323
Author: Matt Van Horn <[email protected]>
Date: 2026-06-28 (Sun, 28 Jun 2026)
Changed paths:
M providers/defltprov.c
Log Message:
-----------
providers/defltprov.c: remove static globals from provider_init
The default provider stored two function pointers from the core
dispatch table (c_gettable_params, c_get_params) in file-scope statics,
written by ossl_default_provider_init() without any synchronization.
When OSSL_PROVIDER_load() is invoked from multiple threads concurrently,
TSAN reports a data race on both writes[1].
c_gettable_params is never read anywhere in the file; it was dead
storage. c_get_params is only consumed once, inside the same call
to ossl_default_provider_init(), to seed the provider context
via ossl_prov_ctx_set0_core_get_params(). It can therefore be a local
variable rather than file-scope state.
Drop the unused c_gettable_params static together with its dispatch
case, and scope c_get_params inside the init function. The behavior
of the default provider is unchanged for single-threaded callers;
the concurrent-load race goes away because the shared mutable state
is gone.
[1] https://github.com/openssl/openssl/issues/28935
CLA: trivial
Resolves: https://github.com/openssl/openssl/issues/28935
Reviewed-by: Norbert Pocs <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
MergeDate: Sun Jun 28 17:51:52 2026
(Merged from https://github.com/openssl/openssl/pull/31508)
(cherry picked from commit 57f4bd9ab801c9d362ef5e110b74362f41db26c3)
Commit: ad5583eb77d6700db908cd536b1910acdb45cb5d
https://github.com/openssl/openssl/commit/ad5583eb77d6700db908cd536b1910acdb45cb5d
Author: Nikola Pajkovsky <[email protected]>
Date: 2026-06-28 (Sun, 28 Jun 2026)
Changed paths:
M providers/baseprov.c
Log Message:
-----------
providers/baseprov.c: remove static globals
c_gettable_params is never read anywhere in the file; it was dead
storage. c_get_params is only consumed once, inside the same call
to ossl_default_provider_init(), to seed the provider context
via ossl_prov_ctx_set0_core_get_params(). It can therefore be a local
variable rather than file-scope state.
Drop the unused c_gettable_params static together with its dispatch
case, and scope c_get_params inside the init function. The behavior
of the base provider is unchanged for single-threaded callers;
the concurrent-load race goes away because the shared mutable state
is gone.
Signed-off-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
MergeDate: Sun Jun 28 17:51:54 2026
(Merged from https://github.com/openssl/openssl/pull/31508)
(cherry picked from commit f3447c3bc217a4439470fb65609b1c3e77956116)
Commit: 3ddd2146e08e435af5892e28cea6f674ca12547c
https://github.com/openssl/openssl/commit/3ddd2146e08e435af5892e28cea6f674ca12547c
Author: Nikola Pajkovsky <[email protected]>
Date: 2026-06-28 (Sun, 28 Jun 2026)
Changed paths:
M providers/fips/fipsprov.c
M test/p_test.c
Log Message:
-----------
providers/fips/fipsprov.c, test/p_test.c: remove c_gettable_params static global
c_gettable_params is never read anywhere in the files; it was dead
storage. Remove it.
Signed-off-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
MergeDate: Sun Jun 28 17:51:55 2026
(Merged from https://github.com/openssl/openssl/pull/31508)
(cherry picked from commit f32f8682eac94360684d9856b7f72de4948b8637)
Compare: https://github.com/openssl/openssl/compare/166750d3f7bc...3ddd2146e08e
To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications
--
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/openssl-3.6/166750-3ddd21%40github.com.