Why do you think that message is relevant to your problem?

You haven't told us anything useful about the problem you're experiencing, like 
what version of OpenSSL you're using. If you want good answers, ask good 
questions.

What we can see below:

- Obviously the parameter being passed to CRYPTO_add_lock is bogus. The problem 
isn't with locks; it's with attempting to operate on garbage data. The most 
likely causes are heap or stack corruption, or use-after-free.

- The value being passed to X509_free isn't a valid pointer either.

My guess is that your application frees something when it shouldn't. Maybe 
you're calling SSL_free twice. It appears that the CERT* passed to 
ssl_cert_clear_certs contains bogus data, and a use-after-free is a likely 
cause.

Since you're running on Linux (which I only know because of the gdb module list 
- again, you haven't provided even the most basic information with your 
question), I'd suggest running the application under Valgrind.

Michael Wojcik
Technology Specialist, Micro Focus


From: openssl-users [mailto:openssl-users-boun...@openssl.org] On Behalf Of 
Vikas TM
Sent: Tuesday, April 12, 2016 10:12
To: openssl-users@openssl.org
Subject: Re: [openssl-users] Received signal SIGSEGV in CRYPTO_add_lock()


Hi,

I am not very clear with solution provided in the following link,
http://lists.globus.org/pipermail/gt-user/2007-December/005317.html

Appreciated if you help me in resolving this issue.

Thanks & Regards,
Vikas
On 11 Apr 2016 8:20 pm, "Vikas TM" 
<vikas...@gmail.com<mailto:vikas...@gmail.com>> wrote:

Hi,

It looks like there is issue in handling crypto locks. I encountered 
segmentation fault in CRYPTO_add_lock() function referencing NULL pointer. 
Please find GDB output below,

(gdb) run ftp://x.x.x.x:sample.txt

Starting program: /App/vikftp ftp://x.x.x.x:sample.txt

Missing separate debuginfo for /lib/ld-linux.so.2

Missing separate debuginfo for /lib/libdl.so.2

Missing separate debuginfo for /lib/libpam.so.0

Missing separate debuginfo for /lib/libm.so.6

Missing separate debuginfo for /lib/libc.so.6

Missing separate debuginfo for /lib/libaudit.so.0

process 22287 is executing new program: /App/vikftp

Missing separate debuginfo for /lib/ld-linux.so.2

Missing separate debuginfo for /lib/libdl.so.2

Missing separate debuginfo for /lib/libpam.so.0

Missing separate debuginfo for /lib/libm.so.6

Missing separate debuginfo for /lib/libc.so.6

Missing separate debuginfo for /lib/libaudit.so.0



Program received signal SIGSEGV, Segmentation fault.

0x08205766 in CRYPTO_add_lock (pointer=0x1011, amount=-1, type=3, 
file=0x85d0030 "/102d/s/tasn_utl.c", line=118)

    at /102d/s/cryptlib.c:624

624             ret = *pointer + amount;

(gdb) bt

#0  0x08205766 in CRYPTO_add_lock (pointer=0x1011, amount=-1, type=3, 
file=0x85d0030 "/102d/s/tasn_utl.c", line=118)

    at /102d/s/cryptlib.c:624

#1  0x08249d2a in asn1_do_lock (pval=0xff8eee90, op=-1, it=0x862cb1c) at 
/102d/s/tasn_utl.c:118

#2  0x08246ed5 in asn1_item_combine_free (pval=0xff8eee90, it=0x862cb1c, 
combine=0) at /102d/s/tasn_fre.c:146

#3  0x08246c40 in ASN1_item_free (val=0x1001, it=0x862cb1c) at 
/102d/s/tasn_fre.c:72

#4  0x0825eeea in X509_free (a=0x1001) at /102d/s/x_x509.c:143

#5  0x082ee677 in ssl_cert_clear_certs (c=0x872e4e0) at /102d/s/ssl_cert.c:431

#6  0x082ee7ed in ssl_cert_free (c=0x872e4e0) at /102d/s/ssl_cert.c:489

#7  0x0822f926 in SSL_free (s=0x872e340) at /102d/s/ssl_lib.c:627

#8  0x0816566c in closeConnection (pcx=0x86d8310, rsn=0x0, graceful=1 '\001') 
at /App/vikftp.c:10098

Please let me know if you have any solution.

Thanks & Regards,
Vikas


Click 
here<https://www.mailcontrol.com/sr/+Cj70KMYCabGX2PQPOmvUgItITKVa7z0gs7YiNqVkgRsY23LiAnRcH9UaLfxQWXam!Wtb8ydoXseRLY+cWrx9g==>
 to report this email as spam.
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

Reply via email to