]> git.ipfire.org Git - thirdparty/openssl.git/commit - providers/defltprov.c
Avoid races by caching exported ciphers in the init function
authorMatt Caswell <matt@openssl.org>
Tue, 26 Jan 2021 15:23:19 +0000 (15:23 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 2 Feb 2021 12:21:21 +0000 (12:21 +0000)
commitb233ea82765e80038e4884564153f9c8543d9396
tree85bc23683d1165916623957b68f3da16c83b8cba
parentcd4e6a351201270cd2769e1e2af7e9fb875a3f80
Avoid races by caching exported ciphers in the init function

TSAN was reporting a race of the exported ciphers cache that we create in
the default and fips providers. This was because we cached it in the query
function rather than the init function, so this would cause a race if multiple
threads queried at the same time. In practice it probably wouldn't make much
difference since different threads should come up with the same answer.

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13987)
providers/defltprov.c
providers/fips/fipsprov.c