- Package:
- irssi-plugin-xmpp
- Source:
- irssi-plugin-xmpp
- Description:
- XMPP plugin for irssi
- Submitter:
- Antoine Beaupré
- Date:
- 2013-09-25 05:45:08 UTC
- Severity:
- important
The screen gets garbled, but I've been able to extract this: *** glibc detected *** irssi: free(): invalid pointer: 0x000000000184d6f8 *** 7f2b58efa000-7f2b58efb000 rw-p 00021000 fe:01 23665 /lib/x86_64-linux-gnu/libncurses.so.5.9 7f2b58efb000-7f2b590b2000 r-xp 00000000 fe:02 564614 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 7f2b590b2000-7f2b592b1000 ---p 001b7000 fe:02 564614 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 7f2b592b1000-7f2b592cc000 r--p 001b6000 fe:02 564614 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 7f2b592cc000-7f2b592db000 rw-p 001d1000 fe:02 564614 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 7f2b592db000-7f2b592df000 rw-p 00000000 00:00 0 7f2b592df000-7f2b59335000 r-xp 00000000 fe:02 564047 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 7f2b59335000-7f2b59534000 ---p 00056000 fe:02 564047 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 7f2b59534000-7f2b59537000 r--p 00055000 fe:02 564047 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 7f2b59537000-7f2b5953e000 rw-p 00058000 fe:02 564047 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 7f2b5953e000-7f2b59633000 r-xp 00000000 fe:01 23708 /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4 7f2b59633000-7f2b59833000 ---p 000f5000 fe:01 23708 /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4 7f2b59833000-7f2b59834000 r--p 000f5000 fe:01 23708 /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4 7f2b59834000-7f2b59835000 rw-p 000f6000 fe:01 23708 /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4 7f2b59835000-7f2b59836000 rw-p 00000000 00:00 0 7f2b59836000-7f2b5983d000 r-xp 00000000 fe:01 23546 /lib/x86_64-linux-gnu/librt-2.13.so 7f2b5983d000-7f2b59a3c000 ---p 00007000 fe:01 23546 /lib/x86_64-linux-gnu/librt-2.13.so 7f2b59a3c000-7f2b59a3d000 r--p 00006000 fe:01 23546 /lib/x86_64-linux-gnu/librt-2.13.so 7f2b59a3d000-7f2b59a3e000 rw-p 00007000 fe:01 23546 /lib/x86_64-linux-gnu/librt-2.13.so 7f2b59a3e000-7f2b59a41000 r-xp 00000000 fe:02 567082 /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4 7f2b59a41000-7f2b59c40000 ---p 00003000 fe:02 567082 /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4 7f2b59c40000-7f2b59c41000 r--p 00002000 fe:02 567082 /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4 7f2b59c41000-7f2b59c42000 rw-p 00003000 fe:02 567082 /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3200.4 7f2b59c42000-7f2b59c4a000 r-xp 00000000 fe:01 23597 /lib/x86_64-linux-gnu/libcrypt-2.13.so 7f2b59c4a000-7f2b59e49000 ---p 00008000 fe:01 23597 /lib/x86_64-linux-gnu/libcrypt-2.13.so 7f2b59e49000-7f2b59e4a000 r--p 00007000 fe:01 23597 /lib/x86_64-linux-gnu/libcrypt-2.13.so 7f2b59e4a000-7f2b59e4b000 rw-p 00008000 fe:01 23597 /lib/x86_64-linux-gnu/libcrypt-2.13.so 7f2b59e4b000-7f2b59e79000 rw-p 00000000 00:00 0 7f2b59e79000-7f2b59e90000 r-xp 00000000 fe:01 23582 /lib/x86_64-linux-gnu/libpthread-2.13.so 7f2b59e90000-7f2b5a08f000 ---p 00017000 fe:01 23582 /lib/x86_64-linux-gnu/libpthread-2.13.so 7f2b5a08f000-7f2b5a090000 r--p 00016000 fe:01 23582 /lib/x86_64-linux-gnu/libpthread-2.13.so 7f2b5a090000-7f2b5a091000 rw-p 00017000 fe:01 23582 /lib/x86_64-linux-gnu/libpthread-2.13.so 7f2b5a091000-7f2b5a095000 rw-p 00000000 00:00 0 7f2b5a095000-7f2b5a116000 r-xp 00000000 fe:01 23670 /lib/x86_64-linux-gnu/libm-2.13.so 7f2b5a116000-7f2b5a315000 ---p 00081000 fe:01 23670 /lib/x86_64-linux-gnu/libm-2.13.so 7f2b5a315000-7f2b5a316000 r--p 00080000 fe:01 23670 /lib/x86_64-linux-gnu/libm-2.13.so 7f2b5a316000-7f2b5a317000 rw-p 00081000 fe:01 23670 /lib/x86_64-linux-gnu/libm-2.13.so 7f2b5a317000-7f2b5a319000 r-xp 00000000 fe:01 23564 /lib/x86_64-linux-gnu/libdl-2.13.so 7f2b5a319000-7f2b5a519000 ---p 00002000 fe:01 23564 /lib/x86_64-linux-gnu/libdl-2.13.so 7f2b5a519000-7f2b5a51a000 r--p 00002000 fe:01 23564 /lib/x86_64-linux-gnu/libdl-2.13.so 7f2b5a51a000-7f2b5a51b000 rw-p 00003000 fe:01 23564 /lib/x86_64-linux-gnu/libdl-2.13.so 7f2b5a51b000-7f2b5a692000 r-xp 00000000 fe:02 281884 /usr/lib/libperl.so.5.14.2 7f2b5a692000-7f2b5a892000 ---p 00177000 fe:02 281884 /usr/lib/libperl.so.5.14.2 7f2b5a892000-7f2b5a896000 r--p 00177000 fe:02 281884 /usr/lib/libperl.so.5.14.2 7f2b5a896000-7f2b5a89b000 rw-p 0017b000 fe:02 281884 /usr/lib/libperl.so.5.14.2 7f2b5a89b000-7f2b5a89c000 rw-p 00000000 00:00 0 7f2b5a89c000-7f2b5a8bc000 r-xp 00000000 fe:01 23712 /lib/x86_64-linux-gnu/ld-2.13.so 7f2b5a8ed000-7f2b5a910000 r--p 00000000 fe:02 264045 /usr/share/locale/fr/LC_MESSAGES/libc.mo 7f2b5a910000-7f2b5aa87000 r--p 00000000 fe:02 301007 /usr/lib/locale/locale-archive 7f2b5aa87000-7f2b5aa90000 rw-p 00000000 00:00 0 7f2b5aab1000-7f2b5aab2000 rw-p 00000000 00:00 0 7f2b5aab2000-7f2b5aab9000 r--s 00000000 fe:02 563686 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache 7f2b5aab9000-7f2b5aabb000 rw-p 00000000 00:00 0 7f2b5aabb000-7f2b5aabc000 r--p 0001f000 fe:01 23712 /lib/x86_64-linux-gnu/ld-2.13.so 7f2b5aabc000-7f2b5aabd000 rw-p 00020000 fe:01 23712 /lib/x86_64-linux-gnu/ld-2.13.so 7f2b5aabd000-7f2b5aabe000 rw-p 00000000 00:00 0 7ffffea2c000-7ffffea4d000 rw-p 00000000 00:00 0 [stack] 7ffffebff000-7ffffec00000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] H 19:27:14 [IMC] -!- Irssi: Disconnecting from server localhost: (leaving) You need to successfully authenticate against a server, then /load otr, then /quit. Here's a gdb backtrace, notice how the debugging symbols don't seem to load properly: warning: "/usr/lib/debug/.build-id/1f/7c15953b6cc4fd3351a760e909e55291de093a.debug": separate debug info file has no debug info warning: "/usr/lib/debug/.build-id/34/f0ef4dae462d0c77467e0b7a70418967b2f6d2.debug": separate debug info file has no debug info warning: "/usr/lib/debug/.build-id/83/71de0e29582dd873bc1942962ce76a64ac3f71.debug": separate debug info file has no debug info Core was generated by `irssi --config=.irssi/config.proxy'. Program terminated with signal 6, Aborted. #0 0x00007f2b58758475 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type. (gdb) bt #0 0x00007f2b58758475 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007f2b5875b6f0 in *__GI_abort () at abort.c:92 #2 0x00007f2b5879352b in __libc_message (do_abort=<optimized out>, fmt=<optimized out>) at ../sysdeps/unix/sysv/linux/libc_fatal.c:189 #3 0x00007f2b5879cd76 in malloc_printerr (action=3, str=0x7f2b58871b9c "free(): invalid pointer", ptr=<optimized out>) at malloc.c:6283 #4 0x00007f2b587a1aac in *__GI___libc_free (mem=<optimized out>) at malloc.c:3738 #5 0x00007f2b568d2a9e in ?? () from /lib/x86_64-linux-gnu/libgcrypt.so.11 #6 0x00007f2b56d81064 in ?? () from /usr/lib/x86_64-linux-gnu/libgnutls.so.26 #7 0x00007f2b56d8b615 in ?? () from /usr/lib/x86_64-linux-gnu/libgnutls.so.26 #8 0x00007f2b56d93b74 in gnutls_deinit () from /usr/lib/x86_64-linux-gnu/libgnutls.so.26 #9 0x00007f2b57671139 in _lm_ssl_close (ssl=0x1220620) at lm-ssl-gnutls.c:300 #10 0x00007f2b5766be78 in connection_do_close (connection=0x1225a40) at lm-connection.c:514 #11 connection_do_close (connection=0x1225a40) at lm-connection.c:494 #12 0x00007f2b5766db32 in lm_connection_close (connection=0x1225a40, error=0x0) at lm-connection.c:1375 #13 0x00007f2b578863bd in server_cleanup () from /usr/lib/irssi/modules/libxmpp_core.so #14 0x000000000048e0ba in ?? () #15 0x000000000048e56d in signal_emit () #16 0x0000000000488ed0 in server_disconnect () #17 0x0000000000490645 in ?? () #18 0x0000000000490c84 in ?? () #19 0x000000000048e0ba in ?? () #20 0x000000000048e56d in signal_emit () #21 0x000000000047a36e in ?? () #22 0x000000000048e0ba in ?? () #23 0x000000000048e56d in signal_emit () #24 0x000000000041c37b in ?? () #25 0x000000000048e0ba in ?? () #26 0x000000000048e56d in signal_emit () #27 0x000000000044e9e7 in ?? () #28 0x000000000048e0ba in ?? () #29 0x000000000048e56d in signal_emit () #30 0x000000000044f3b3 in key_pressed () #31 0x000000000041bc2e in ?? () #32 0x000000000048e0ba in ?? () #33 0x000000000048e56d in signal_emit () #34 0x000000000041d05e in ?? () #35 0x0000000000480f99 in ?? () #36 0x00007f2b59588355 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #37 0x00007f2b59588688 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #38 0x00007f2b59588744 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #39 0x000000000041905c in main () I wonder if the bug isn't in libloudmouth. But then again, it seems to be raising an exception - shouldn't we be catching it?
tags 707758 + confirmed block 707758 376463 block 714499 376463 thanks In my reading, this is just a regular shutdown of an xmpp connection over ssl, which works in the normal case but leads to a segfault when the otr module (irssi-plugin-otr) is loaded as well. With a few more debugging symbols, the first few lines of the backtrace look like this: #0 0x00007f825cec11e5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007f825cec4398 in __GI_abort () at abort.c:90 #2 0x00007f825cefc7cb in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7f825cff8be8 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:199 #3 0x00007f825cf06a26 in malloc_printerr (action=3, str=0x7f825cff4b8a "free(): invalid pointer", ptr=<optimized out>) at malloc.c:4902 #4 0x00007f825cf077a3 in _int_free (av=<optimized out>, p=0x25eb5c8, have_lock=0) at malloc.c:3758 #5 0x00007f825b666ea6 in _gcry_free (p=0x25eb5e0) at global.c:879 #6 0x00007f825b904bf4 in _gnutls_cipher_deinit (handle=handle@entry=0x25e1208) at gnutls_cipher_int.c:147 #7 0x00007f825b90f1b5 in free_record_state (read=1, state=0x25e11d8) at gnutls_constate.c:786 #8 _gnutls_epoch_free (session=<optimized out>, params=0x25e11c0) at gnutls_constate.c:797 #9 0x00007f825b917704 in gnutls_deinit (session=0x25e3a20) at gnutls_state.c:399 #10 0x00007f825c40d139 in _lm_ssl_close (ssl=0x22e7ec0) at lm-ssl-gnutls.c:300 #11 0x00007f825c407e78 in connection_do_close (connection=0x22e8b30) at lm-connection.c:514 #12 connection_do_close (connection=0x22e8b30) at lm-connection.c:494 #13 0x00007f825c409b32 in lm_connection_close (connection=0x22e8b30, error=error@entry=0x0) at lm-connection.c:1375 #14 0x00007f825c621ffb in server_cleanup (server=0x22ed670) at xmpp-servers.c:102 #15 0x00000000004879e2 in ?? () #16 0x0000000000487e4d in signal_emit () #17 0x0000000000482a9e in server_disconnect () When running under valgrind, the valgrind log shows libotr doing a few invalid reads/writes just there, so I thought maybe it hooks into gnutls/gcrypt and wrecks havock there: ==10086== Invalid read of size 8 ==10086== at 0xDD5BCE5: ??? (in /usr/lib/libotr.so.5.0.0) ==10086== by 0x8C1FEA5: _gcry_free (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2) ==10086== by 0x897FBF3: _gnutls_cipher_deinit (gnutls_cipher_int.c:147) ==10086== by 0x898A1B4: _gnutls_epoch_free (gnutls_constate.c:786) ==10086== by 0x8992703: gnutls_deinit (gnutls_state.c:399) ==10086== by 0x7EE3138: _lm_ssl_close (lm-ssl-gnutls.c:300) ==10086== by 0x7EDDE77: connection_do_close (lm-connection.c:514) ==10086== by 0x7EDFB31: lm_connection_close (lm-connection.c:1375) ==10086== by 0x7CC5FFA: server_cleanup (in /usr/lib/irssi/modules/libxmpp_core.so) ==10086== by 0x4879E1: ??? (in /usr/bin/irssi) ==10086== by 0x487E4C: signal_emit (in /usr/bin/irssi) ==10086== by 0x482A9D: server_disconnect (in /usr/bin/irssi) ==10086== Address 0xb70a9e8 is 8 bytes before a block of size 1,167 alloc'd ==10086== at 0x4C2935B: malloc (vg_replace_malloc.c:270) ==10086== by 0x8C1F0F0: do_malloc.constprop.4 (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2) ==10086== by 0x8C1FF96: _gcry_calloc (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2) ==10086== by 0x8C27EB6: _gcry_cipher_open (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2) ==10086== by 0x89EE663: wrap_gcry_cipher_init (cipher.c:46) ==10086== by 0x897FA0E: _gnutls_cipher_init (gnutls_cipher_int.c:64) ==10086== by 0x89898BD: _gnutls_init_record_state.isra.2 (gnutls_constate.c:299) ==10086== by 0x8989D6D: _gnutls_epoch_set_keys (gnutls_constate.c:431) ==10086== by 0x898A37D: _gnutls_write_connection_state_init (gnutls_constate.c:602) ==10086== by 0x89754C3: _gnutls_send_handshake_final (gnutls_handshake.c:2888) ==10086== by 0x897841B: _gnutls_handshake_common (gnutls_handshake.c:3121) ==10086== by 0x8979BC9: gnutls_handshake (gnutls_handshake.c:2690) ==10086== ==10086== Invalid write of size 4 ==10086== at 0x4C2EBEF: memset (mc_replace_strmem.c:1007) ==10086== by 0xDD5BCF2: ??? (in /usr/lib/libotr.so.5.0.0) ==10086== by 0x8C1FEA5: _gcry_free (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2) ==10086== by 0x897FBF3: _gnutls_cipher_deinit (gnutls_cipher_int.c:147) ==10086== by 0x898A1B4: _gnutls_epoch_free (gnutls_constate.c:786) ==10086== by 0x8992703: gnutls_deinit (gnutls_state.c:399) ==10086== by 0x7EE3138: _lm_ssl_close (lm-ssl-gnutls.c:300) ==10086== by 0x7EDDE77: connection_do_close (lm-connection.c:514) ==10086== by 0x7EDFB31: lm_connection_close (lm-connection.c:1375) ==10086== by 0x7CC5FFA: server_cleanup (in /usr/lib/irssi/modules/libxmpp_core.so) ==10086== by 0x4879E1: ??? (in /usr/bin/irssi) ==10086== by 0x487E4C: signal_emit (in /usr/bin/irssi) ==10086== Address 0xb70a9e8 is 8 bytes before a block of size 1,167 alloc'd ==10086== at 0x4C2935B: malloc (vg_replace_malloc.c:270) ==10086== by 0x8C1F0F0: do_malloc.constprop.4 (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2) ==10086== by 0x8C1FF96: _gcry_calloc (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2) ==10086== by 0x8C27EB6: _gcry_cipher_open (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2) ==10086== by 0x89EE663: wrap_gcry_cipher_init (cipher.c:46) ==10086== by 0x897FA0E: _gnutls_cipher_init (gnutls_cipher_int.c:64) ==10086== by 0x89898BD: _gnutls_init_record_state.isra.2 (gnutls_constate.c:299) ==10086== by 0x8989D6D: _gnutls_epoch_set_keys (gnutls_constate.c:431) ==10086== by 0x898A37D: _gnutls_write_connection_state_init (gnutls_constate.c:602) ==10086== by 0x89754C3: _gnutls_send_handshake_final (gnutls_handshake.c:2888) ==10086== by 0x897841B: _gnutls_handshake_common (gnutls_handshake.c:3121) ==10086== by 0x8979BC9: gnutls_handshake (gnutls_handshake.c:2690) But just now I found #376463, especially Message #10: Since irssi-plugin-otr is using libgcrypt, and irssi-plugin-xmpp is using loudmouth which is using gnutls for ssl connections which is using libgcrypt, I think we can conclude that until #376463 is fixed, using jabber-over-ssl together with otr in irssi is just not possible. Florian