Bug#830265: ring: Backport to Jessie?

Petter Reinholdtsen pere at hungry.com
Mon Aug 22 21:50:22 UTC 2016


I had another go with the backport, and managed to get the code building
by downloading a lot of the dependencies instead of using the Debian
equvalents.  But the resulting dring binary do not work.  It crashes
with a segfault.  According to gdb, this is the crash site:

Program received signal SIGSEGV, Segmentation fault.
__memcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:36
36      ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S: No such file or directory.
(gdb) bt
#0  __memcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:36
#1  0x00007ffff5f0731f in memcpy (__len=32767, __src=0x7fffffffc35c, __dest=0x7fffffffc40c)
    at /usr/include/x86_64-linux-gnu/bits/string3.h:51
#2  x86_sha1_update (ctx=0x7fffffffc3f0, length=<optimized out>, data=0x555555b88df6 "")
    at sha-x86-ssse3.c:126
#3  0x00007ffff5f07757 in wrap_x86_hash_fast (algo=<optimized out>, text=0x555555b88bd0, 
    text_size=550, digest=0x7fffffffc640) at sha-x86-ssse3.c:339
#4  0x00007ffff5e7eb26 in _gnutls_hash_fast (algorithm=algorithm at entry=GNUTLS_DIG_SHA1, 
    text=0x555555b88bd0, textlen=550, digest=digest at entry=0x7fffffffc640)
    at gnutls_hash_int.c:114
#5  0x00007ffff5ed6528 in _gnutls_get_key_id (pk=pk at entry=GNUTLS_PK_RSA, 
    params=params at entry=0x7fffffffc550, output_data=output_data at entry=0x7fffffffc640 "", 
    output_data_size=output_data_size at entry=0x7fffffffc638) at x509.c:2523
#6  0x00007ffff5ed6680 in gnutls_x509_crt_get_key_id (crt=0x555555b3a2d0, 
    flags=<optimized out>, output_data=0x7fffffffc640 "", output_data_size=0x7fffffffc638)
    at x509.c:2583
#7  0x00005555557a4179 in dht::crypto::Certificate::getId (this=this at entry=0x7fffffffc7a0)
    at crypto.cpp:627
#8  0x00005555555fc928 in ring::RingAccount::loadIdentity (this=this at entry=0x555555b35300)
    at ringaccount.cpp:508
#9  0x00005555555fdccd in ring::RingAccount::checkIdentityPath (this=0x555555b35300)
    at ringaccount.cpp:452
#10 0x000055555565232f in ring::Manager::loadAccount (
    this=this at entry=0x555555aef300 <ring::Manager::instance()::instance_>, node=..., 
    errorCount=@0x7fffffffca4c: 0, accountOrder="61351441220ef85e/") at manager.cpp:2578
#11 0x00005555556527fb in ring::Manager::loadAccountMap (
    this=this at entry=0x555555aef300 <ring::Manager::instance()::instance_>, node=...)
    at manager.cpp:2615
#12 0x00005555556531aa in ring::Manager::parseConfiguration (
    this=this at entry=0x555555aef300 <ring::Manager::instance()::instance_>)
    at manager.cpp:237
#13 0x000055555565396f in ring::Manager::init (
    this=0x555555aef300 <ring::Manager::instance()::instance_>, config_file="")
    at manager.cpp:287
#14 0x00005555555c9e04 in DRing::start (config_file="") at ring_api.cpp:69
#15 0x0000555555597453 in DBusClient::initLibrary (this=this at entry=0x555555b24920, 
    flags=flags at entry=0) at dbusclient.cpp:221
#16 0x0000555555598691 in DBusClient::DBusClient (this=0x555555b24920, flags=0, 
    persistent=<optimized out>) at dbusclient.cpp:99
#17 0x000055555559113f in main (argc=1, argv=0x7fffffffdfe8) at main.cpp:194
(gdb)

But valgrind claim this is the problem:

==30187== Invalid read of size 8
==30187==    at 0x4C2D800: memcpy@@GLIBC_2.14 (vg_replace_strmem.c:915)
==30187==    by 0x6B6D31E: x86_sha1_update (in /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28.41.0)
==30187==    by 0x6B6D756: wrap_x86_hash_fast (in /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28.41.0)
==30187==    by 0x6AE4B25: _gnutls_hash_fast (in /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28.41.0)
==30187==    by 0x6AF182B: gnutls_fingerprint (in /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28.41.0)
==30187==    by 0x351627: dht::InfoHash::get(unsigned char const*, unsigned long) (infohash.cpp:57)
==30187==    by 0x1B989C: get (infohash.h:185)
==30187==    by 0x1B989C: ring::RingAccount::doRegister_() (ringaccount.cpp:884)
==30187==    by 0x9AC396F: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20)
==30187==    by 0x6DD30A3: start_thread (pthread_create.c:309)
==30187==    by 0xA31787C: clone (clone.S:111)
==30187==  Address 0xb39075d0 is not stack'd, malloc'd or (recently) free'd
==30187== 
==30187== 
==30187== Process terminating with default action of signal 11 (SIGSEGV)
==30187==  Access not within mapped region at address 0xB39075D0
==30187==    at 0x4C2D800: memcpy@@GLIBC_2.14 (vg_replace_strmem.c:915)
==30187==    by 0x6B6D31E: x86_sha1_update (in /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28.41.0)
==30187==    by 0x6B6D756: wrap_x86_hash_fast (in /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28.41.0)
==30187==    by 0x6AE4B25: _gnutls_hash_fast (in /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28.41.0)
==30187==    by 0x6AF182B: gnutls_fingerprint (in /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28.41.0)
==30187==    by 0x351627: dht::InfoHash::get(unsigned char const*, unsigned long) (infohash.cpp:57)
==30187==    by 0x1B989C: get (infohash.h:185)
==30187==    by 0x1B989C: ring::RingAccount::doRegister_() (ringaccount.cpp:884)
==30187==    by 0x9AC396F: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20)
==30187==    by 0x6DD30A3: start_thread (pthread_create.c:309)
==30187==    by 0xA31787C: clone (clone.S:111)

I'm not able to figure out exactly what go wrong here.  Anyone got any
ideas?

-- 
Happy hacking
Petter Reinholdtsen



More information about the Pkg-voip-maintainers mailing list