Certificate verification failure
Reproduce step
I don't really know because it's the first time I see this and can't reproduce with another account. But this is what I think:
- Alice (device A) add Bob (device B)
- Alice and Bob talks
- Alice erase the config and re-import the account on its device
- Alice call Bob again
- Bob is segfaulting.
Expected
Alice should be able to call Bob and Bob should have the ability to answer to that call.
backtrace
__memcmp_avx2_movbe () at ../sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S:68
68 ../sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S: No such file or directory.
(gdb) bt
#0 0x00007ffff213bbae in __memcmp_avx2_movbe () at ../sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S:68
#1 0x00007ffff6f15e38 in () at /usr/lib/x86_64-linux-gnu/libgnutls.so.30
#2 0x00007ffff6f3c046 in () at /usr/lib/x86_64-linux-gnu/libgnutls.so.30
#3 0x00007ffff6f45b10 in gnutls_x509_trust_list_verify_crt2 ()
at /usr/lib/x86_64-linux-gnu/libgnutls.so.30
#4 0x000055555593f04c in dht::crypto::TrustList::verify(dht::crypto::Certificate const&) const ()
#5 0x000055555562c070 in ring::tls::TrustStore::isAllowed(dht::crypto::Certificate const&, bool) ()
#6 0x000055555566b419 in std::_Function_handler<void (std::shared_ptr<dht::crypto::Certificate> const&), ring::RingAccount::onPeerMessage(dht::Hash<20ul> const&, std::function<void (std::shared_ptr<dht::crypto::Certificate> const&, dht::Hash<20ul> const&)>)::{lambda(std::shared_ptr<dht::crypto::Certificate> const&)#1}>::_M_invoke(std::_Any_data const&, std::shared_ptr<dht::crypto::Certificate> const&) ()
#7 0x0000555555666c4c in ring::RingAccount::findCertificate(dht::Hash<20ul> const&, std::function<void (std::shared_ptr<dht::crypto::Certificate> const&)>&&) ()
#8 0x0000555555669e0f in ring::RingAccount::onPeerMessage(dht::Hash<20ul> const&, std::function<void (std::shared_ptr<dht::crypto::Certificate> const&, dht::Hash<20ul> const&)>) ()
#9 0x00005555556739b6 in std::_Function_handler<bool (dht::IceCandidates&&), ring::RingAccount::doRegister_()::{lambda(dht::IceCandidates&&)#11}>::_M_invoke(std::_Any_data const&, dht::IceCandidates&&) ()
#10 0x00005555556a7b98 in std::_Function_handler<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&), std::future<unsigned long> dht::DhtRunner::listen<dht::IceCandidates>(dht::Hash<20ul>, std::function<bool (dht::IceCandidates&&)>, dht::Value::Filter, dht::Where)::{lambda(std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&)#1}>::_M_invoke(std::_Any_data const&, std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&) ()
#11 0x0000555555945582 in std::_Function_handler<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool), dht::DhtRunner::listen(dht::Hash<20ul>, std::function<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool)>, dht::Value::Filter, dht::Where)::{lambda(dht::SecureDht&)#1}::operator()(dht::SecureDht&)::{lambda(std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool)#1}>::_M_invoke(std::_Any_data const&, std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool&&) ()
#12 0x00005555559cc9c9 in std::_Function_handler<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool), dht::SecureDht::getCallbackFilter(std::function<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool)>, dht::Value::Filter&&)::{lambda(std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool)#1}>::_M_invoke(std::_Any_data const&, std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool&&) ()
#13 0x00005555559a91d7 in dht::OpCache::onValuesAdded(std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&) ()
#14 0x00005555559aae11 in std::_Function_handler<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool), dht::OpCache::OpCache()::{lambda(std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool)#1}>::_M_invoke(std::_Any_data const&, std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool&&) ()
#15 0x00005555559a63d9 in dht::OpValueCache::onValuesAdded(std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&) ()
#16 0x00005555559a6cd2 in std::_Function_handler<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool), dht::SearchCache::listen(std::function<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool)>, std::shared_ptr<dht::Query>, dht::Value::Filter, std::function<unsigned long (std::shared_ptr<dht::Query>, std::function<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > con---Type <return> to continue, or q <return> to quit---
st&, bool)>)>)::{lambda(std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool)#1}>::_M_invoke(std::_Any_data const&, std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool&&) ()
#17 0x0000555555968840 in std::_Function_handler<void (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool), std::function<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool)> >::_M_invoke(std::_Any_data const&, std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool&&) ()
#18 0x0000555555968432 in std::_Function_handler<void (), dht::ValueCache::addValues[abi:cxx11](std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, dht::TypeStore const&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#19 0x000055555596d2d2 in dht::ValueCache::onValues(std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&, dht::TypeStore const&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) ()
#20 0x000055555595de05 in std::_Function_handler<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool), dht::DhtProxyClient::doListen(dht::Hash<20ul> const&, std::function<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool)>, dht::Value::Filter)::{lambda(std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool)#2}>::_M_invoke(std::_Any_data const&, std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool&&) ()
#21 0x000055555595acf9 in std::_Function_handler<void (), dht::DhtProxyClient::sendListen(std::shared_ptr<restbed::Request> const&, std::function<bool (std::vector<std::shared_ptr<dht::Value>, std::allocator<std::shared_ptr<dht::Value> > > const&, bool)> const&, dht::Value::Filter const&, std::shared_ptr<dht::DhtProxyClient::ListenState> const&)::{lambda(std::shared_ptr<restbed::Request> const&, std::shared_ptr<restbed::Response> const&)#1}::operator()(std::shared_ptr<restbed::Request> const&, std::shared_ptr<restbed::Response> const&) const::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#22 0x000055555595c079 in dht::DhtProxyClient::periodic(unsigned char const*, unsigned long, dht::SockAddr const&) ()
#23 0x000055555596a3a1 in dht::DhtProxyClient::periodic(unsigned char const*, unsigned long, sockaddr const*, unsigned int) ()
#24 0x000055555594f25c in dht::DhtRunner::loop_() ()
#25 0x000055555594f671 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<dht::DhtRunner::run(dht::SockAddr const&, dht::SockAddr const&, dht::DhtRunner::Config)::{lambda()#1}> > >::_M_run() ()
#26 0x00007ffff2a16733 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#27 0x00007ffff5ae46db in start_thread (arg=0x7fff817fa700) at pthread_create.c:463
#28 0x00007ffff20d288f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95