Commit 200b907a2e for openssl.org

commit 200b907a2e0ffbca1da702859c1d28a38b4f8dc9
Author: Nikola Pajkovsky <nikolap@openssl.org>
Date:   Wed Sep 16 08:57:38 2026 +0200

    test: handle atomic load failure in hashtable cleanup

    hashtable_mt_free() ignores the return value of
    CRYPTO_atomic_load_int(). If fallback lock acquisition fails, the
    output remains uninitialized and the callback may read it while
    checking whether the entry was scheduled for deletion.

    Fixes Coverity CID 1701147
    Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
    Reviewed-by: Neil Horman <nhorman@openssl.org>
    Reviewed-by: Norbert Pocs <norbertp@openssl.org>
    Merge-date: Thu Sep 17 13:34:45 2026
    Merged-from: https://github.com/openssl/openssl/pull/32844

diff --git a/test/lhash_test.c b/test/lhash_test.c
index bf45226d90..a62651052e 100644
--- a/test/lhash_test.c
+++ b/test/lhash_test.c
@@ -673,7 +673,11 @@ static void hashtable_mt_free(HT_VALUE *v)
     int pending_delete;
     int ret;

-    CRYPTO_atomic_load_int(&m->pending_delete, &pending_delete, worker_lock);
+    if (!TEST_true(CRYPTO_atomic_load_int(&m->pending_delete, &pending_delete,
+            worker_lock))) {
+        free_failure = 1;
+        return;
+    }

     if (shutting_down == 1)
         return;