[openssl/openssl] f7c5fd: Fix calling pthread_key_delete on uninitialized data
    Petr Mikhalitsyn 
    noreply at github.com
       
    Mon Apr 24 09:34:37 UTC 2023
    
    
  
  Branch: refs/heads/openssl-3.1
  Home:   https://github.com/openssl/openssl
  Commit: f7c5fdec7248ec0805429f115b2140fff54faad0
      https://github.com/openssl/openssl/commit/f7c5fdec7248ec0805429f115b2140fff54faad0
  Author: Petr Mikhalicin <mkh199740 at mail.ru>
  Date:   2023-04-24 (Mon, 24 Apr 2023)
  Changed paths:
    M crypto/context.c
  Log Message:
  -----------
  Fix calling pthread_key_delete on uninitialized data
default_context_do_init may be never called and CRYPTO_THREAD_init_local
inside it may be never called too. But corresponding
CRYPTO_THREAD_cleanup_local is always called at cleanup stage. This lead
to undefined behavior.
So, add flag to check that default_context_do_init will be called
successfully or not.
Fix: #20697
Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20801)
(cherry picked from commit 31295ca02c0a2d7209a33047c7f6dd1dabc12c93)
    
    
More information about the openssl-commits
mailing list