Skip to content

openssl 1.1.1.d CRYPTO_THREAD_write_lock Program received signal SIGSEGV #11144

@jaesunglife

Description

@jaesunglife

[Test Environment]

  1. OS : CentOS 6.7 64bit
  2. linux kernel 2.6.32-573.el6.x86_64
  3. ldd (GNU libc) 2.12
  4. gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
  5. openssl version 1.1.1d

[Test sequence]

  1. Static build of openssl 1.1.1d
    {openssl source}/config
    make
    libcrypto.a & libss.a

  2. A segment fault occurs when running program static link.
    gcc -g -Wall -Wno-write-strings -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ....... libssl.a libcrypto.a ldl -lm -lrt -lpthread

  3. The program is a single-thread program.

lock = 0x0 causes segment fault
Please help me with what's wrong.

#0 0x000000321fe0ac9a in pthread_rwlock_wrlock (lock=0x0) from /lib64/libpthread.so.0
#1 0x0000000000488ce9 in CRYPTO_THREAD_write_lock ()
#2 0x0000000000488d2b in CRYPTO_atomic_add ()
#3 0x0000000000477231 in rand_drbg_get_nonce ()
#4 0x00007ffff1d58dfd in RAND_DRBG_instantiate () from /----.so
#5 0x00007ffff1d59b90 in drbg_setup () from /----.so
#6 0x00007ffff1d59c7b in do_rand_drbg_init_ossl_ () from /----.so
#7 0x000000321fe0cdb3 in pthread_once () from /lib64/libpthread.so.0
#8 0x00007ffff1d85a29 in CRYPTO_THREAD_run_once () from /----.so
#9 0x00007ffff1d59bd4 in RAND_DRBG_get0_private () from /----.so
#10 0x00007ffff1d5a405 in RAND_priv_bytes () from /----.so
#11 0x00007ffff1dcb76a in bnrand () from /----.so
#12 0x00007ffff1dcba16 in bnrand_range () from /----.so
#13 0x00007ffff1dc47ec in BN_BLINDING_create_param () from /----.so
#14 0x00007ffff1d6173e in RSA_setup_blinding () from /----.so
#15 0x00007ffff1d619c9 in RSA_blinding_on () from /----.so
#16 0x00007ffff1beae5e in SZRSA_PublicByteDec (_pSZRSA=0x7fffffffa3f8,

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: questionThe issue was opened to ask a question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions