openssl / openssl

TLS/SSL and crypto library

Home Page:https://www.openssl.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hang in CRYPTO_THREAD_run_once after particular sequence of operations

guidovranken opened this issue · comments

Consistently reproduces with OpenSSL git master.
This particular PoC needs MD2 support, but depending on what the underlying issue is, it might also manifest without MD2.
Very strange. Found after investigating a OSS-Fuzz Cryptofuzz crash that wouldn't reproduce on a single input (that's why nobody got an e-mail about it), but did reproduce on a particular set of inputs, so please credit OSS-Fuzz with the discovery. See https://oss-fuzz.com/testcase-detail/5719357012836352 if you have access.

#include <openssl/evp.h>

#define CF_CHECK_EQ(expr, res) if ( (expr) != (res) ) { goto end; }
#define CF_CHECK_NE(expr, res) if ( (expr) == (res) ) { goto end; }
#define CF_CHECK_GTE(expr, res) if ( (expr) < (res) ) { goto end; }

static void hmac(void) {
    static uint8_t key[128] = {0};
    static uint8_t cleartext[125] = {0};

    EVP_MD_CTX* ctx = NULL;
    const EVP_MD* md = NULL;
    EVP_PKEY *pkey = NULL;

    CF_CHECK_NE(ctx = EVP_MD_CTX_new(), NULL);
    CF_CHECK_NE(md = EVP_sha256(), NULL);
    CF_CHECK_NE(pkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL, key, sizeof(key)), NULL);
    CF_CHECK_EQ(EVP_DigestSignInit(ctx, NULL, md, NULL, pkey), 1);

    CF_CHECK_EQ(EVP_DigestSignUpdate(ctx, cleartext, sizeof(cleartext)), 1);

    {
        size_t len = -1;
        uint8_t out[EVP_MAX_MD_SIZE];
        CF_CHECK_EQ(EVP_DigestSignFinal(ctx, out, &len), 1);
    }
end:
    EVP_PKEY_free(pkey);
    EVP_MD_CTX_free(ctx);
}

static void digest(void) {
    static uint8_t cleartext[24] = {0};

    EVP_MD_CTX* ctx = NULL;
    const EVP_MD* md = NULL;

    CF_CHECK_NE(ctx = EVP_MD_CTX_new(), NULL);
    CF_CHECK_NE(md = EVP_md2(), NULL);
    CF_CHECK_EQ(EVP_DigestInit_ex(ctx, md, NULL), 1);

    CF_CHECK_EQ(EVP_DigestUpdate(ctx, cleartext, sizeof(cleartext)), 1);
    {
        unsigned int len = -1;
        unsigned char md[EVP_MAX_MD_SIZE];
        CF_CHECK_EQ(EVP_DigestFinal_ex(ctx, md, &len), 1);
    }

end:
    EVP_MD_CTX_free(ctx);
}

static void decrypt(void) {
    static uint8_t key[16] = {0};
    static uint8_t iv[16] = {0};
    static uint8_t cleartext[125] = {0};

    size_t out_size = 524288;
    size_t outIdx = 0;
    uint8_t* out = malloc(out_size);

    const EVP_CIPHER* cipher = NULL;
    EVP_CIPHER_CTX* ctx = NULL;

    {
        CF_CHECK_NE(ctx = EVP_CIPHER_CTX_new(), NULL);
        CF_CHECK_NE(cipher = EVP_aes_128_cfb8(), NULL);
        CF_CHECK_EQ(EVP_DecryptInit_ex(ctx, cipher, NULL, NULL, NULL), 1);

        CF_CHECK_EQ(EVP_DecryptInit_ex(ctx, NULL, NULL, key, iv), 1);
    }

    {
        CF_CHECK_GTE(out_size, sizeof(cleartext) + EVP_CIPHER_block_size(cipher));

        int len = -1;
        CF_CHECK_EQ(EVP_DecryptUpdate(ctx, out + outIdx, &len, cleartext, sizeof(cleartext)), 1);

        outIdx += len;
        out_size -= len;
    }

    {
        CF_CHECK_GTE(out_size, (size_t)EVP_CIPHER_block_size(cipher));

        int len = -1;
        CF_CHECK_EQ(EVP_DecryptFinal_ex(ctx, out + outIdx, &len), 1);
        outIdx += len;
    }

end:
    EVP_CIPHER_CTX_free(ctx);
    free(out);
}

int main(void)
{
    OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
    hmac();
    hmac();
    hmac();
    digest();
    digest();
    digest();
    decrypt();
    hmac();
    return 0;
}

Thanks, will investigate. And especially, thanks for the use case.

@levitte did you take a look at this?

Appears to have been fixed.

Reopening this. This keeps reappearing in OSS-Fuzz Cryptofuzz.

I don't have access, so can't say much for sure. However, MD2 is a legacy algorithm and has ended up in the legacy provider, and that one's not being loaded by default. I don't know how the fuzzers treat this, so it may be that there's an app that needs to load the legacy provider explicitly, or it may be that the work I submitted today (#9373 and all the stuff it depends on) will resolve the situation.

Here are the stack traces.
Would you like me to add you to the Cryptofuzz project @ OSS-Fuzz ?

https://oss-fuzz.com/testcase-detail/5673444177346560

UndefinedBehaviorSanitizer:DEADLYSIGNAL
--
  | ==56==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7ff19c5d0edc bp 0x7ffc77888160 sp 0x7ffc77888140 T56)
  | ==56==The signal is caused by a READ memory access.
  | ==56==Hint: address points to the zero page.
  | #0 0x7ff19c5d0edb in __GI___pthread_rwlock_unlock
  | #1 0xc69273 in CRYPTO_THREAD_unlock openssl/crypto/threads_pthread.c:86:9
  | #2 0xce4458 in ossl_method_store_cache_set openssl/crypto/property/property.c:0
  | #3 0xc82678 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #4 0xb1f7de in EVP_MD_fetch openssl/crypto/evp/digest.c:682:9
  | #5 0xb1f5eb in EVP_DigestInit_ex openssl/crypto/evp/digest.c:177:26

https://oss-fuzz.com/testcase-detail/5695064774279168 :


AddressSanitizer:DEADLYSIGNAL
--
  | =================================================================
  | ==1==ERROR: AddressSanitizer: ILL on unknown address 0x7f610fd1bedc (pc 0x7f610fd1bedc bp 0x7fff3fb25610 sp 0x7fff3fb255f0 T0)
  | SCARINESS: 10 (signal)
  | #0 0x7f610fd1bedb in __GI___pthread_rwlock_unlock
  | #1 0xe89053 in CRYPTO_THREAD_unlock openssl/crypto/threads_pthread.c:86:9
  | #2 0xf494cd in ossl_method_store_cache_set openssl/crypto/property/property.c:0:17
  | #3 0xeadad1 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #4 0xcb353e in EVP_MD_fetch openssl/crypto/evp/digest.c:682:9
  | #5 0xcb3026 in EVP_DigestInit_ex openssl/crypto/evp/digest.c:177:26
  | #6 0xc77f94 in HMAC_Init_ex openssl/crypto/hmac/hmac.c:70:14
  | #7 0xea0d12 in pbkdf2_derive openssl/crypto/kdf/pbkdf2.c:280:10
  | #8 0xea080d in kdf_pbkdf2_derive openssl/crypto/kdf/pbkdf2.c:210:12

https://oss-fuzz.com/testcase-detail/5701960008728576 :


UndefinedBehaviorSanitizer:DEADLYSIGNAL
--
  | ==401==ERROR: UndefinedBehaviorSanitizer: UNKNOWN SIGNAL on unknown address 0x000000000095 (pc 0x7f3ee6c71edc bp 0x7ffde88f1a90 sp 0x7ffde88f1a70 T401)
  | #0 0x7f3ee6c71edb in __GI___pthread_rwlock_unlock
  | #1 0xc6a383 in CRYPTO_THREAD_unlock openssl/crypto/threads_pthread.c:86:9
  | #2 0xce5c38 in ossl_method_store_cache_set openssl/crypto/property/property.c:0
  | #3 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #4 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #5 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #6 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #7 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #8 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #9 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #10 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #11 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #12 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #13 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #14 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #15 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #16 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #17 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #18 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #19 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #20 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #21 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #22 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #23 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #24 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #25 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #26 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #27 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #28 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #29 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #30 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #31 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #32 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #33 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #34 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #35 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #36 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #37 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #38 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #39 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #40 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #41 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #42 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #43 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #44 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #45 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #46 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #47 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #48 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #49 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #50 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #51 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #52 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #53 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #54 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #55 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #56 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #57 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #58 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #59 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #60 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #61 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #62 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #63 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #64 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #65 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #66 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #67 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #68 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #69 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #70 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #71 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #72 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #73 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #74 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #75 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #76 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #77 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #78 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #79 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #80 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #81 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #82 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #83 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #84 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #85 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #86 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #87 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #88 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #89 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #90 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #91 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #92 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #93 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #94 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #95 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #96 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #97 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #98 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #99 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #100 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #101 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #102 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #103 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #104 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #105 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #106 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #107 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #108 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #109 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #110 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #111 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #112 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #113 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #114 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #115 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #116 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #117 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #118 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #119 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #120 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #121 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #122 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #123 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #124 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #125 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #126 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #127 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #128 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #129 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #130 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #131 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #132 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #133 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #134 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #135 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #136 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #137 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #138 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #139 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #140 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #141 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #142 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #143 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #144 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #145 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #146 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #147 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #148 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #149 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #150 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #151 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #152 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #153 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #154 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #155 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #156 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #157 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #158 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #159 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #160 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #161 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #162 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #163 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #164 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #165 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #166 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #167 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #168 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #169 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #170 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #171 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #172 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #173 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #174 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #175 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #176 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #177 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #178 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #179 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #180 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #181 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #182 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #183 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #184 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #185 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #186 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #187 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #188 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #189 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #190 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #191 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #192 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #193 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #194 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #195 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #196 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #197 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #198 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #199 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #200 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #201 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #202 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #203 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #204 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #205 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #206 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #207 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #208 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #209 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #210 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #211 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #212 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #213 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #214 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #215 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #216 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #217 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #218 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #219 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #220 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #221 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #222 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #223 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #224 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #225 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #226 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #227 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #228 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #229 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #230 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #231 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #232 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #233 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9
  | #234 0xc4cced in OPENSSL_CTX_get0_public_drbg openssl/crypto/rand/drbg_lib.c:1334:25
  | #235 0xc4a593 in rand_bytes_ex openssl/crypto/rand/rand_lib.c:787:12
  | #236 0xce6096 in impl_cache_flush_cache openssl/crypto/property/property.c:400:14
  | #237 0xafb6e4 in doall_util_fn openssl/crypto/lhash/lhash.c:205:17
  | #238 0xcebbea in sa_doall openssl/crypto/sparse_array.c:98:21
  | #239 0xce5d3c in ossl_method_cache_flush_some openssl/crypto/property/property.c:428:5
  | #240 0xce5ab7 in ossl_method_store_cache_set openssl/crypto/property/property.c:474:9
  | #241 0xc83ba8 in evp_generic_fetch openssl/crypto/evp/evp_fetch.c:219:13
  | #242 0xb09dce in EVP_CIPHER_fetch openssl/crypto/evp/evp_enc.c:1196:9
  | #243 0xc4eedd in drbg_ctr_init openssl/crypto/rand/drbg_ctr.c:0
  | #244 0xc4aadb in RAND_DRBG_set openssl/crypto/rand/drbg_lib.c:333:15
  | #245 0xc4b111 in rand_drbg_new openssl/crypto/rand/drbg_lib.c:442:9
  | #246 0xc4ce90 in drbg_setup openssl/crypto/rand/drbg_lib.c:1120:12
  | #247 0xc4d468 in drbg_ossl_ctx_new openssl/crypto/rand/drbg_lib.c:175:25
  | #248 0xafa253 in openssl_ctx_generic_new openssl/crypto/context.c:151:17
  | #249 0xc71d87 in CRYPTO_alloc_ex_data openssl/crypto/ex_data.c:424:5
  | #250 0xaf9e72 in openssl_ctx_get_data openssl/crypto/context.c:204:9

Please do add me

Has this issue been resolved by #9477 meanwhile?

Not sure which commit did it, but yeah I think it's fixed now.

Not sure which commit did it, but yeah I think it's fixed now.

Good to hear that it's fixed now. And it's not so important to verify which commit exactly fixed your issue. I assumed it was fixed by #9477, because your call stack looks very similar to the one in issue #9455.