#
7ed6de99 |
| 05-Sep-2024 |
Tomas Mraz |
Copyright year updates Reviewed-by: Neil Horman <nhorman@openssl.org> Release: yes
|
#
01753c09 |
| 12-Jul-2024 |
Neil Horman |
Set down_load factor on hash table when culling items in doall oss-fuzz noted this issue: https://oss-fuzz.com/testcase-detail/5363002606419968 Which reports a heap buffer overf
Set down_load factor on hash table when culling items in doall oss-fuzz noted this issue: https://oss-fuzz.com/testcase-detail/5363002606419968 Which reports a heap buffer overflow during ossl_method_cache_flush_some Its occuring because we delete items from the hash table while inside its doall iterator The iterator in lhash.c does a reverse traversal of all buckets in the hash table, and at some point a removal during an iteration leads to the hash table shrinking, by calling contract. When that happens, the bucket index becomes no longer valid, and if the index we are on is large, it exceeds the length of the list, leading to an out of band reference, and the heap buffer overflow report. Fix it by preventing contractions from happening during the iteration, but setting the down_load factor to 0, and restoring it to its initial value after the iteration is done Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from https://github.com/openssl/openssl/pull/24867)
show more ...
|
#
d8def798 |
| 02-Jul-2024 |
Neil Horman |
read lock store on ossl_method_store_do_all Theres a data race between ossl_method_store_insert and ossl_method_store_do_all, as the latter doesn't take the property lock before iter
read lock store on ossl_method_store_do_all Theres a data race between ossl_method_store_insert and ossl_method_store_do_all, as the latter doesn't take the property lock before iterating. However, we can't lock in do_all, as the call stack in several cases later attempts to take the write lock. The choices to fix it are I think: 1) add an argument to indicate to ossl_method_store_do_all weather to take the read or write lock when doing iterations, and add an is_locked api to the ossl_property_[read|write] lock family so that subsequent callers can determine if they need to take a lock or not 2) Clone the algs sparse array in ossl_method_store_do_all and use the clone to iterate with no lock held, ensuring that updates to the parent copy of the sparse array are left untoucheTheres a data race between ossl_method_store_insert and ossl_method_store_do_all, as the latter doesn't take the property lock before iterating. I think method (2), while being a bit more expensive, is probably the far less invasive way to go here Fixes #24672 Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24782)
show more ...
|
#
da1c088f |
| 07-Sep-2023 |
Matt Caswell |
Copyright year updates Reviewed-by: Richard Levitte <levitte@openssl.org> Release: yes
|
#
cb8e6413 |
| 02-Aug-2023 |
Pauli |
no_autoload: make the no-autoload-config option work again. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://gith
no_autoload: make the no-autoload-config option work again. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/21621)
show more ...
|
#
7a6a0baa |
| 20-Feb-2023 |
Matt Caswell |
Only call OPENSSL_init_crypto on fetch if using the default libctx There is no point in calling OPENSSL_init_crypto() unless we are actually going to be using the default libctx.
Only call OPENSSL_init_crypto on fetch if using the default libctx There is no point in calling OPENSSL_init_crypto() unless we are actually going to be using the default libctx. Fixes #20315 Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20341)
show more ...
|
#
92a25e24 |
| 24-Nov-2022 |
Tomas Mraz |
Fix occasional assertion failure when storing properties Fixes #18631 The store lock does not prevent concurrent access to the property cache, because there are multiple stores.
Fix occasional assertion failure when storing properties Fixes #18631 The store lock does not prevent concurrent access to the property cache, because there are multiple stores. We drop the newly created entry and use the exisiting one if there is one already. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19762)
show more ...
|
#
56d4ff6c |
| 29-Jul-2022 |
Pauli |
property: make cache flushing slight less deterministic If there is no timer available to seed the stochastic flushing, revert to a global seed that gets updated each flush. Rev
property: make cache flushing slight less deterministic If there is no timer available to seed the stochastic flushing, revert to a global seed that gets updated each flush. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18906)
show more ...
|
#
e1eafe8c |
| 14-Apr-2022 |
Richard Levitte |
"Reserve" the method store when constructing methods Introducing the concept of reserving the store where a number of provided operation methods are to be stored. This avoids ra
"Reserve" the method store when constructing methods Introducing the concept of reserving the store where a number of provided operation methods are to be stored. This avoids racing when constructing provided methods, which is especially pertinent when multiple threads are trying to fetch the same method, or even any implementation for the same given operation type. This introduces a |biglock| in OSSL_METHOD_STORE, which is separate from the |lock| which is used for more internal and finer grained locking. Fixes #18152 Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18153)
show more ...
|
#
5317b6ee |
| 22-Mar-2022 |
Hugo Landau |
Add deprecation macro for 3.1 and deprecate OPENSSL_LH_stats Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/op
Add deprecation macro for 3.1 and deprecate OPENSSL_LH_stats Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17937)
show more ...
|
#
fed8dbea |
| 02-Jun-2022 |
Matt Caswell |
Fix a memory leak in ossl_method_store_add() If the call to ossl_prop_defn_set() fails then the OSSL_PROPERTY_LIST we just created will leak. Found as a result of: https://g
Fix a memory leak in ossl_method_store_add() If the call to ossl_prop_defn_set() fails then the OSSL_PROPERTY_LIST we just created will leak. Found as a result of: https://github.com/openssl/openssl/pull/18355#issuecomment-1139499881 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18458)
show more ...
|
#
03454ba2 |
| 25-Apr-2022 |
Richard Levitte |
Complete the cleanup of an algorithm in OSSL_METHOD_STORE The `alg_cleanup` didn't properly clear the OPENSSL_SA leaf that it had just freed the contents of. Fortunately, `ossl_sa_ALGOR
Complete the cleanup of an algorithm in OSSL_METHOD_STORE The `alg_cleanup` didn't properly clear the OPENSSL_SA leaf that it had just freed the contents of. Fortunately, `ossl_sa_ALGORITHM_doall_arg()` allows us to pass the store pointer itself as an extra argument, which allows a modified `alg_cleanup` to complete the job. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18151)
show more ...
|
#
2e4d0677 |
| 22-Apr-2022 |
Richard Levitte |
Make it possible to remove methods by the provider that provides them This adds ossl_method_store_remove_all_provided(), which selectively removes methods from the given store that are p
Make it possible to remove methods by the provider that provides them This adds ossl_method_store_remove_all_provided(), which selectively removes methods from the given store that are provided by the given provider. This also adds the EVP specific evp_method_store_remove_all_provided(), which matches ossl_method_store_remove_all_provided() but can also retrieve the correct store to manipulate for EVP functions. This allows us to modify ossl_provider_self_test() to do the job it's supposed to do, but through clearly defined functions instead of a cache flushing call that previously did more than that. ossl_provider_deactivate() is also modified to remove methods associated with the deactivated provider, and not just clearing the cache. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18151)
show more ...
|
#
60640d79 |
| 22-Apr-2022 |
Richard Levitte |
Don't empty the method store when flushing the query cache When evp_method_store_flush() flushed the query cache, it also freed all methods in the EVP method store, through an unfortunat
Don't empty the method store when flushing the query cache When evp_method_store_flush() flushed the query cache, it also freed all methods in the EVP method store, through an unfortunate call of ossl_method_store_flush_cache() with an argument saying that all methods should indeed be dropped. To undo some of the confusion, ossl_method_store_flush_cache() is renamed to ossl_method_store_cache_flush_all(), and limited to do only that. Some if the items in the internal ALGORITHM structure are also renamed and commented to clarify what they are for. Fixes #18150 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18151)
show more ...
|
#
20b6d85a |
| 20-Apr-2022 |
Richard Levitte |
Drop ossl_provider_clear_all_operation_bits() and all uses of it This is a misused function, as it was called during query cache flush, when the provider operation bits were meant to rec
Drop ossl_provider_clear_all_operation_bits() and all uses of it This is a misused function, as it was called during query cache flush, when the provider operation bits were meant to record if methods for a certain operation has already been added to the method store. Fixes #18150 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18151)
show more ...
|
#
fecb3aae |
| 03-May-2022 |
Matt Caswell |
Update copyright year Reviewed-by: Tomas Mraz <tomas@openssl.org> Release: yes
|
#
927d0566 |
| 14-Mar-2022 |
Hugo Landau |
Refactor OSSL_LIB_CTX to avoid using CRYPTO_EX_DATA This refactors OSSL_LIB_CTX to avoid using CRYPTO_EX_DATA. The assorted objects to be managed by OSSL_LIB_CTX are hardcoded and are in
Refactor OSSL_LIB_CTX to avoid using CRYPTO_EX_DATA This refactors OSSL_LIB_CTX to avoid using CRYPTO_EX_DATA. The assorted objects to be managed by OSSL_LIB_CTX are hardcoded and are initialized eagerly rather than lazily, which avoids the need for locking on access in most cases. Fixes #17116. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17881)
show more ...
|
#
af788ad6 |
| 25-Feb-2022 |
Pauli |
fetch: convert a NULL property query to "" Previously, a NULL property query was never cached and this lead to a performance degregation. Now, such a query is converted to an empty stri
fetch: convert a NULL property query to "" Previously, a NULL property query was never cached and this lead to a performance degregation. Now, such a query is converted to an empty string and cached. Fixes #17752 Fixes https://github.openssl.org/openssl/openssl/issues/26 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17769)
show more ...
|
#
ed5b26ce |
| 10-Nov-2021 |
Pauli |
Add return value NULL checks that were missing Issues located by Brian Carpenter of Geeknik's Farm. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/o
Add return value NULL checks that were missing Issues located by Brian Carpenter of Geeknik's Farm. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17007)
show more ...
|
#
dc010ca6 |
| 04-Oct-2021 |
Richard Levitte |
CORE: Encure that cached fetches can be done per provider This mostly entails passing around a provider pointer, and handling queries that includes a pointer to a provider, where NULL me
CORE: Encure that cached fetches can be done per provider This mostly entails passing around a provider pointer, and handling queries that includes a pointer to a provider, where NULL means "any". This also means that there's a need to pass the provider pointer, not just down to the cache functions, but also be able to get it from ossl_method_store_fetch(). To this end, that function's OSSL_PROVIDER pointer argument is modified to be a pointer reference, so the function can answer back what provider the method comes from. Test added. Fixes #16614 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16725)
show more ...
|
#
2fee3a77 |
| 23-Jun-2021 |
Pauli |
property: remove spurious incorrect comments Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15871)
|
#
d05bfc12 |
| 18-Jun-2021 |
Pauli |
crypto: repalce tabs with spaces Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1
crypto: repalce tabs with spaces Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15824)
show more ...
|
#
f0191d0b |
| 03-Jun-2021 |
Richard Levitte |
Add the internal function ossl_method_store_do_all() It will simply call the given callback for every method found in the given store. Fixes #15538 Fixes #14837 Rev
Add the internal function ossl_method_store_do_all() It will simply call the given callback for every method found in the given store. Fixes #15538 Fixes #14837 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15604)
show more ...
|
Revision tags: openssl-3.0.0-alpha17 |
|
#
b1c053ac |
| 11-May-2021 |
Matt Caswell |
Ensure mirroring of properties works for subsequent updates If the global properties are updated after a provider with a child libctx has already started we need to make sure those updat
Ensure mirroring of properties works for subsequent updates If the global properties are updated after a provider with a child libctx has already started we need to make sure those updates are mirrored in that child. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15242)
show more ...
|
Revision tags: openssl-3.0.0-alpha16 |
|
#
a16d2174 |
| 26-Apr-2021 |
Matt Caswell |
Add the ability for ex_data to have a priority Where an object has multiple ex_data associated with it, then we free that ex_data in order of priority (high priority first). Rev
Add the ability for ex_data to have a priority Where an object has multiple ex_data associated with it, then we free that ex_data in order of priority (high priority first). Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14991)
show more ...
|