[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] SSL segmentation fault (libssl 1.0.0) (#260)

smalltalking notifications at github.com
Sun May 13 17:59:32 UTC 2018


The VM built by travis (201805090836, 64-bit Squeak Cog Spur) segfaults when creating an SSL connection. Here is a stack trace from gdb:

> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000000000 in ?? ()
> (gdb) bt
> #0  0x0000000000000000 in ?? ()
> #1  0x00007ffff296132a in sqVerifyNameInner (ssl=ssl at entry=0x89b3e0, cert=cert at entry=0x8abdb0, serverName=0x89bad0, serverNameLength=serverNameLength at entry=13, matchType=matchType at entry=2)
>     at /home/travis/build/OpenSmalltalk/opensmalltalk-vm/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc:106
> #2  0x00007ffff29614ab in sqVerifyDNS (ssl=ssl at entry=0x89b3e0, cert=cert at entry=0x8abdb0, serverName=<optimized out>, serverNameLength=serverNameLength at entry=13)
>     at /home/travis/build/OpenSmalltalk/opensmalltalk-vm/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc:94
> #3  0x00007ffff2961e3f in sqConnectSSL (handle=handle at entry=1, srcBuf=srcBuf at entry=0x1025330 "\026\003\003", srcLen=srcLen at entry=279, dstBuf=dstBuf at entry=0x1020b88 "\026\003\003", dstLen=<optimized out>)
>     at /home/travis/build/OpenSmalltalk/opensmalltalk-vm/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc:454
> #4  0x00007ffff295de2f in primitiveConnect () at /home/travis/build/OpenSmalltalk/opensmalltalk-vm/src/plugins/SqueakSSL/SqueakSSL.c:217

This happens on Ubuntu 14.04 (libssl1.0.0). I presume travis had a newer version of openssl, and the different value of OPENSSL_VERSION_NUMBER during compilation time was enough to make some functions, like _sqo_sk_GENERAL_NAME_num_  be linked to null. It's not exactly clear how the overlay works, so I just tried a few functions and got the following results:

> (gdb) print sqo_X509_get_ext_d2i
> $3 = (void *(*)(X509 *, int, int *, int *)) 0x7ffff2440a90 <X509_get_ext_d2i>
> (gdb) print sqo_sk_GENERAL_NAME_num
> No symbol "sqo_sk_GENERAL_NAME_num" in current context.
> (gdb) print sqo_sk_GENERAL_NAME_value
> No symbol "sqo_sk_GENERAL_NAME_value" in current context.
> (gdb) print sqVerifySAN
> $6 = {sqInt (sqSSL *, const GENERAL_NAME *, const void *, const size_t, const int)} 0x7ffff29610f0 <sqVerifySAN>
> (gdb) print sk_GENERAL_NAME_num
> No symbol "sk_GENERAL_NAME_num" in current context.
> (gdb) print sqo_SKM_sk_num
> No symbol "sqo_SKM_sk_num" in current context.
> (gdb) print sqo_sk_num
> $7 = (int (*)(const _STACK *)) 0x0
> (gdb) print sk_num
> $8 = {<text variable, no debug info>} 0x7ffff24064c0 <sk_num>

If you need any further information, let me know.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/260
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180513/7f5eef1b/attachment.html>


More information about the Vm-dev mailing list