property: lock the lib ctx when updating the property definition cache
authorPauli <pauli@openssl.org>
Wed, 7 Apr 2021 01:32:59 +0000 (11:32 +1000)
committerPauli <pauli@openssl.org>
Thu, 8 Apr 2021 07:46:35 +0000 (17:46 +1000)
commit4b1f34f11ff94bc2d0169d6669bfc47f99bd93b3
tree9fd4f62d675b6cf0d179ceb5256f367ab056f466
parenta135dea4e024ea6750be25859c1d613789a4d575
property: lock the lib ctx when updating the property definition cache

Although the store being used is adequately and properly locked, the library
context is not.  Due to the mechanisms used for fetching, it is possible for
multiple stores to live within the same library context for short periods.
This fix prevents threading issues resulting from such coincidences.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14773)
crypto/context.c
crypto/property/defn_cache.c
include/internal/core.h