Stack smashing error when sending messages to a server with an encrypted connection

Skip to first unread message

Tom Morris

Apr 14, 2016, 11:35:40 AM4/14/16
to libstrophe
Hi all,

I've written a script to send messages to an Openfire server from my raspberry pi. When I first ran the script, the program terminated with the description: *** stack smashing detected ***: After disabling the connection encryption on the server everything worked fine.

I am now trying to send messages to another server, one on which connections are encrypted and I have posibility of changing. Again I'm getting the stack smashing, with the whole log being as follows:

xmpp DEBUG SRV lookup failed.
xmpp DEBUG Using alternate domain <NULL>, port 0
xmpp DEBUG sock_connect to returned 3
xmpp DEBUG attempting to connect to
xmpp DEBUG connection successful
conn DEBUG SENT: <?xml version="1.0"?><stream:stream to="" xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="">
xmpp DEBUG RECV: <stream:stream id='2071529191' from='' version='1.0' lang='en'>
xmpp DEBUG RECV: <features xmlns=""><c hash="sha-1" xmlns="" ver="CN+Bi/nPDdZXEFPfLRlpdSZ6Bpw=" node=""/><register xmlns=""/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism></mechanisms></features>
*** stack smashing detected ***: ./messenger5 terminated

Has anyone come across this error before? If so, what was your fix?


Tom Morris

Dmitry Podgorny

Apr 14, 2016, 1:03:24 PM4/14/16
to libstrophe

Seems familiar. It can be problem with duplicated SHA1 function names in libstrophe and openssl. See the next links for details:

The problem is fixed in master, so if you rebuild libstrophe from git ( you won't experience it anymore. If you can't build library from sources, what version is installed on your RPI? And did you build against static or dynamic library?
Reply all
Reply to author
0 new messages