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

65 views
Skip to first unread message

Tom Morris

unread,
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 xmpp.requea.com:5222 returned 3
xmpp DEBUG attempting to connect to xmpp.requea.com
xmpp DEBUG connection successful
conn DEBUG SENT: <?xml version="1.0"?><stream:stream to="xmpp.requea.com" xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
xmpp DEBUG RECV: <stream:stream id='2071529191' from='xmpp.requea.com' version='1.0' lang='en'>
xmpp DEBUG RECV: <features xmlns="http://etherx.jabber.org/streams"><c hash="sha-1" xmlns="http://jabber.org/protocol/caps" ver="CN+Bi/nPDdZXEFPfLRlpdSZ6Bpw=" node="http://www.process-one.net/en/ejabberd/"/><register xmlns="http://jabber.org/features/iq-register"/><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
Aborted

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

Cheers,

Tom Morris


Dmitry Podgorny

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

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

https://github.com/boothj5/profanity/issues/404
https://github.com/strophe/libstrophe/issues/32
https://github.com/strophe/libstrophe/issues/40

The problem is fixed in master, so if you rebuild libstrophe from git (https://github.com/strophe/libstrophe) 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
Forward
0 new messages