Subject: Bug#850421: marked as done (libsqlcipher0: qTox
segfaults with distro provided libsqlcipher0)



Your message dated Sat, 12 Aug 2017 23:51:47 +0000
with message-id <[email protected]>
and subject line Bug#850421: fixed in sqlcipher 3.4.1-1
has caused the Debian Bug report #850421,
regarding libsqlcipher0: qTox segfaults with distro provided libsqlcipher0
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


--
850421: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850421
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message --- Package: libsqlcipher0
Version: 3.2.0-2
Severity: important

Dear Hans-Christoph,

This could be severity grave, but as I did not verify whether other
applications using libsqlcipher0 crash, I am setting it to important for
now.

Sometime ago qTox started crashing after entering profile password on my
Debian setup. This may have been shortly before Christmas and may relate
to your change in 3.2.0-2.

I reported this first with upstream:

segmentation fault on startup #4054
https://github.com/qTox/qTox/issues/4054


And after several attempts with compiling qTox myself and trying to compile
sqlcipher library myself (which failed on my system for 3.4.0), I found that
downgrading libsqlcipher0 to

http://snapshot.debian.org/archive/debian/20161011T120354Z/pool/main/s/sqlcipher/libsqlcipher0_3.2.0-1.1%2Bb2_amd64.deb

fixes the issue for me.

So it appears to me that this is a distribution side issue which may be
related to the transition to openssl 1.1.


Steps to reproduce

1) rm -r ~/.config/tox (make backup first!)
2) start qtox
3) Create new profile, I used user "test" with password "12"

You do not need to compile qTox yourself, but can install packages as
described in:

https://software.opensuse.org/download.html?project=home%3Aantonbatenev%3Atox&package=qtox

The bug happens with qtox package, with qtox-alpha package and with self
compiled qtox from git 6b51381980e4d742efff0905a697040efbcce049
(https://github.com/qTox/qTox.git).

For now I will pin the libsqlcipher0 package to the older version.


Here is one of the backtraces from qTox copied from my upstream bug report:

~> rm -r .config/tox
~> gdb qtox
GNU gdb (Debian 7.12-4) 7.12
[…]
Reading symbols from qtox...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/qtox
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffd386b700 (LWP 29067)]
[New Thread 0x7fffc91b0700 (LWP 29068)]
[New Thread 0x7fffc89af700 (LWP 29069)]
[20:46:01.844 UTC] persistence/settings.cpp:133 : Debug: No settings file
found, using defaults
[20:46:01.844 UTC] persistence/settings.cpp:137 : Debug: "Loading settings from
:/conf/qtox.ini"
[20:46:01.872 UTC] ipc.cpp:59 : Debug: Our global IPC ID is 8654026102535548247
[20:46:01.872 UTC] ipc.cpp:77 : Debug: Attaching to the global shared memory
[20:46:01.873 UTC] ipc.cpp:279 : Debug: Previous owner timed out, taking
ownership 15489039419219317944 -> 8654026102535548247
[20:46:01.873 UTC] main.cpp:215 : Debug: built on: 22:21:02 Nov 17 2016 (
1481344888 )
[20:46:01.873 UTC] main.cpp:216 : Debug: commit:
5648106b34fc7dc3ad4e169651a0cbbd0139170a

[20:46:01.873 UTC] nexus.cpp:85 : Debug: Starting up
[20:46:12.892 UTC] persistence/settings.cpp:2383 : Debug: Creating new profile
settings in "/home/martin/.config/tox//test.ini"
[New Thread 0x7fffc1db1700 (LWP 29074)]
[20:46:13.121 UTC] persistence/settings.cpp:494 : Debug: "Saving global
settings at /home/martin/.config/tox/qtox.ini"

Thread 5 "qTox Database" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffc1db1700 (LWP 29074)]
0x00007ffff3c2f75d in EVP_EncryptUpdate ()
from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
(gdb) bt full
#0 0x00007ffff3c2f75d in EVP_EncryptUpdate ()
at /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
#1 0x00007ffff3f79e3b in sqlcipher_openssl_cipher (ctx=0x7fffb801aaa8,
mode=<optimized out>, key=0x7fffb801aac8
"HA\201\241\213\322\372_\026\236\004r((\360\232V\035\320cF\351\262\316?\254\232\235\365\340--",
key_sz=<optimized out>, iv=0x7fffb80165c8
"\r\230\202\257\306sOj\334k\215\233\026U#\b\v\277\201\221o99\264\214d\246\231E\321\006\257\315\372\005~\202\312\002\375}N\222\361v\264ۛu",
in=0x7fffb801b918 "\004", in_sz=960, out=0x7fffb8016208 "") at sqlite3.c:16517
tmp_csz = 0
csz = <optimized out>
ectx = 0x7fffb801f5b0
#2 0x00007ffff3f8a47e in sqlcipher_page_cipher ([email protected]=0x7fffb80161a8,
for_ctx=<optimized out>, pgno=1, mode=1, page_sz=<optimized out>,
in=0x7fffb801b918 "\004", out=0x7fffb8016208 "") at sqlite3.c:15696
c_ctx = 0x7fffb801a998
iv_in = 0x7fffb801bcd8 ""
iv_out = 0x7fffb80165c8
"\r\230\202\257\306sOj\334k\215\233\026U#\b\v\277\201\221o99\264\214d\246\231E\321\006\257\315\372\005~\202\312\002\375}N\222\361v\264ۛu"
hmac_in = <optimized out>
hmac_out = 0x7fffb80165d8
"\v\277\201\221o99\264\214d\246\231E\321\006\257\315\372\005~\202\312\002\375}N\222\361v\264ۛu"
out_start = 0x7fffb8016208 ""
size = 960
#3 0x00007ffff3f9c104 in sqlite3Codec (iCtx=0x7fffb80161a8,
data=0x7fffb801b908, pgno=1, mode=6) at sqlite3.c:14389
ctx = 0x7fffb80161a8
offset = <optimized out>
rc = <optimized out>
page_sz = 1024
pData = 0x7fffb801b908 "SQLite format 3"
buffer = 0x7fffb80161f8
kdf_salt = 0x7fffb8014af8
#4 0x00007ffff3faa799 in pager_write_pagelist
([email protected]=0x7fffb8003ca8, pList=0x7fffb801bd40) at sqlite3.c:48086
offset = 0
pData = <optimized out>
pgno = 1
rc = 0
#5 0x00007ffff3fb25fa in sqlite3PagerCommitPhaseOne (pPager=0x7fffb8003ca8,
[email protected]=0x0, [email protected]=0) at sqlite3.c:50033
---Type <return> to continue, or q <return> to quit---
rc = <optimized out>
#6 0x00007ffff3fb27cf in sqlite3PagerCommitPhaseOne (noSync=0, zMaster=0x0,
pPager=<optimized out>) at sqlite3.c:49932
rc = 0
pBt = 0x7fffb80037e8
#7 0x00007ffff3fb27cf in sqlite3BtreeCommitPhaseOne (p=0x7fffb8003788,
[email protected]=0x0) at sqlite3.c:57764
pBt = 0x7fffb80037e8
#8 0x00007ffff3fb6421 in sqlite3BtreeCommitPhaseOne (zMaster=0x0, p=<optimized
out>) at sqlite3.c:89551
rc = 0
pBt = <optimized out>
i = 0
nTrans = <optimized out>
rc = 0
needXcommit = <optimized out>
mrc = <optimized out>
eStatementOp = <optimized out>
isSpecialError = <optimized out>
rc = <optimized out>
db = 0x7fffb80031b8
#9 0x00007ffff3fb6421 in vdbeCommit (p=0x7fffb8014c18, db=0x7fffb80031b8)
at sqlite3.c:1586
pBt = <optimized out>
i = 0
nTrans = <optimized out>
rc = 0
needXcommit = <optimized out>
mrc = <optimized out>
eStatementOp = <optimized out>
isSpecialError = <optimized out>
rc = <optimized out>
db = 0x7fffb80031b8
#10 0x00007ffff3fb6421 in sqlite3VdbeHalt ([email protected]=0x7fffb8014c18)
at sqlite3.c:1993
mrc = <optimized out>
eStatementOp = <optimized out>
isSpecialError = <optimized out>
rc = <optimized out>
db = 0x7fffb80031b8
#11 0x00007ffff3fe5926 in sqlite3VdbeExec ([email protected]=0x7fffb8014c18)
---Type <return> to continue, or q <return> to quit---
at sqlite3.c:71867
zType = <optimized out>
zLogFmt = <optimized out>
pc = 42
aOp = <optimized out>
pOp = 0x7fffb801cea8
rc = 0
db = <optimized out>
resetSchemaOnFault = 0 '\000'
encoding = <optimized out>
iCompare = <optimized out>
nVmStep = <optimized out>
nProgressLimit = <optimized out>
aMem = <optimized out>
pIn1 = <optimized out>
pIn2 = <optimized out>
pIn3 = <optimized out>
pOut = <optimized out>
aPermute = <optimized out>
lastRowid = 0
#12 0x00007ffff3fe68cf in sqlite3Step (p=0x7fffb8014c18) at sqlite3.c:69631
db = 0x7fffb80031b8
rc = <optimized out>
db = <optimized out>
v = <optimized out>
pStmt = <optimized out>
v = <optimized out>
#13 0x00007ffff3fe68cf in sqlite3_step (pStmt=<optimized out>) at sqlite3.c:4161
db = <optimized out>
v = <optimized out>
pStmt = <optimized out>
v = <optimized out>
#14 0x0000555555629bf0 in ()
#15 0x00005555556c2695 in ()
#16 0x00007fffef357449 in QObject::event(QEvent*) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007fffefd7db2c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
()
at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007fffefd852e1 in QApplication::notify(QObject*, QEvent*) ()
at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007fffef32a990 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
()
---Type <return> to continue, or q <return> to quit---
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007fffef32d11d in QCoreApplicationPrivate::sendPostedEvents(QObject*,
int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007fffef37ebf3 in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007ffff02d27f7 in g_main_dispatch (context=0x7fffb8000990)
at ././glib/gmain.c:3203
dispatch = 0x7fffef37ebe0
prev_source = 0x0
was_in_call = 0
user_data = 0x0
callback = 0x0
cb_funcs = <optimized out>
cb_data = <optimized out>
need_destroy = <optimized out>
source = 0x7fffb80012d0
current = 0x7fffbc0023b0
i = 0
#23 0x00007ffff02d27f7 in g_main_context_dispatch
([email protected]=0x7fffb8000990) at ././glib/gmain.c:3856
#24 0x00007ffff02d2a60 in g_main_context_iterate
([email protected]=0x7fffb8000990, [email protected]=1,
[email protected]=1, self=<optimized out>)
at ././glib/gmain.c:3929
max_priority = 2147483647
timeout = -1
some_ready = 1
nfds = 1
allocated_nfds = 1
fds = <optimized out>
#25 0x00007ffff02d2b0c in g_main_context_iteration (context=0x7fffb8000990,
may_block=1) at ././glib/gmain.c:3990
retval = <optimized out>
#26 0x00007fffef37efff in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007fffef32897a in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007fffef1560f3 in QThread::exec() ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007fffef15ada8 in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007fffeec24464 in start_thread (arg=0x7fffc1db1700) at
pthread_create.c:333
__res = <optimized out>
pd = 0x7fffc1db1700
---Type <return> to continue, or q <return> to quit---
now = <optimized out>
unwind_buf =
{cancel_jmp_buf = {{jmp_buf = {140736445748992,
-2559072876665711923, 0, 140737488343263, 0, 140737354125376,
2559130291348230861, 2559035533675909837}, mask_was_saved = 0}}, priv = {pad =
{0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = <optimized out>
pagesize_m1 = <optimized out>
sp = <optimized out>
freesize = <optimized out>
__PRETTY_FUNCTION__ = "start_thread"
#31 0x00007fffee0ca9df in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:105
(gdb)
(gdb) quit
A debugging session is active.

Inferior 1 [process 29063] will be killed.

Quit anyway? (y or n) y

Thanks,
Martin

-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.15-tp520-btrfstrim+ (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages libsqlcipher0 depends on:
ii libc6 2.24-8
ii libssl1.1 1.1.0c-2

libsqlcipher0 recommends no packages.

libsqlcipher0 suggests no packages.

-- no debconf information

--- End Message --- --- Begin Message --- Source: sqlcipher
Source-Version: 3.4.1-1

We believe that the bug you reported is fixed in the latest version of
sqlcipher, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Micah Anderson <[email protected]> (supplier of updated sqlcipher package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 12 Aug 2017 15:43:34 -0400
Source: sqlcipher
Binary: sqlcipher libsqlcipher0 libsqlcipher-dev
Architecture: source
Version: 3.4.1-1
Distribution: unstable
Urgency: medium
Maintainer: Hans-Christoph Steiner <[email protected]>
Changed-By: Micah Anderson <[email protected]>
Description:
libsqlcipher-dev - SQLCipher development files
libsqlcipher0 - SQLCipher shared library
sqlcipher - Command line interface for SQLCipher
Closes: 850421 859685
Changes:
sqlcipher (3.4.1-1) unstable; urgency=medium
.
[ Andre Bianchi ]
* cleanup debian/rules. Thanks Joost van Baal-Ilić, Thomas Goirand and Micah
Anderson for teaching me a lot of stuff.
* use debhelper 10
* use latest debian policy version (4.0.1)
* remove redundant and empty configure options
.
[ Simon Fondrie-Teitler ]
* update to latest upstream: v3.4.1 (Closes: #850421)
* update Standards-Version to 3.9.8 - no changes required
.
[ Ben Carillo ]
* add -DHAVE_USLEEP=1 to build options (Closes: #859685)
Checksums-Sha1:
35ee589936ff1c9c0da302761550f2aa3e58537c 2335 sqlcipher_3.4.1-1.dsc
969b996b3c7249778c353d02362bb08ebe5a993e 13873645 sqlcipher_3.4.1.orig.tar.gz
a170473ee9c5782c9aff9e4f9ffaa0f9adf64d81 14408 sqlcipher_3.4.1-1.debian.tar.xz
334bf5a357d43ecfd07e0867c52cd00a6ce2ab69 5794
sqlcipher_3.4.1-1_source.buildinfo
Checksums-Sha256:
c1ac068ae0657076ac56f8be1ff02514aa8a12ad28e7228856a823699e7580e9 2335
sqlcipher_3.4.1-1.dsc
4172cc6e5a79d36e178d36bd5cc467a938e08368952659bcd95eccbaf0fa4ad4 13873645
sqlcipher_3.4.1.orig.tar.gz
4e931aeade93d8211217fa2ca9d69fcf217103307a3b70f8a8ad152419b75f98 14408
sqlcipher_3.4.1-1.debian.tar.xz
701ddc5e238384b1883603cc8bc230df99e6785b008aa6be2c02b204ebc79ee4 5794
sqlcipher_3.4.1-1_source.buildinfo
Files:
c83c03793d9b581c35e188455a5d58e0 2335 devel optional sqlcipher_3.4.1-1.dsc
edd1c57129c21a22ab2c2fd7f47d4ccd 13873645 devel optional
sqlcipher_3.4.1.orig.tar.gz
fad3b12e4c647d60f437e11156e7258c 14408 devel optional
sqlcipher_3.4.1-1.debian.tar.xz
2a1a883c75ee5f861f7c62f47c75285a 5794 devel optional
sqlcipher_3.4.1-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEER3dTX+VHFWJiYHe1jL+aMihhp5AFAlmPj9NfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDQ3
Nzc1MzVGRTU0NzE1NjI2MjYwNzdCNThDQkY5QTMyMjg2MUE3OTAACgkQjL+aMihh
p5B+IA//StUgPe3KnuK0+Z3BnVdRNswaRbTFqR6cWn1eVt2yehcuM30o4d7WFYxs
bSJHM4n6ZqcbO/c8I7dFzkQ+fvKQIs3M2+oM6peh2Vu5V9cXBxhzFgondJWGbUp+
Ov8Rs21kISzdxNji68SjAky0b5j5L8TNPP2wvKJl1IVymJAIUUtcEnmkPxrkyND5
IW7gJJIIpvoLwuvp91747IwbqWcAimK2hBCAVvOpsajhUVWIL3EYjXpFyulLj934
K6+hgW2/leJcA9P7KoICCQ8cp+FNFBkBfYI8OJtwbQdl1h42GiE2qZtItQX83oKh
gllakVUgWrwudQFprraKKL3AlO85pmMMpbHkZMePVMLKWN2krfwia3IrKBcrEPy/
cAVjthX5UXSYlxaNcuJcjwx0VqWCXYTx52nTcwaVz2ybP8HiaH1c4z6Vgysx1p/f
VIhsp7J9UVWl1vrUa1nW7uJMYYYwU3T9dqQPteWe7AKx1axxDlM95jTRGwo4AKPm
2XvqB9dkb6RgUXRFMYFNuS/OQcs7mMLu+We4QotAt96HK7fVqSECQiBSDp9oLBmD
kyDZVcp4Tgy5DvfQ7Oq00AlP7n53nO0+lpk6JhiqX1hrDX9bUov0aARbC5wk0IXl
dt3qWSPxaEdWbAriotiZi0JysznveD8Lbv9gkvL0vJ56XQrLvCQ=
=A1mm
-----END PGP SIGNATURE-----
--- End Message ---



Programming list archiving by: Enterprise Git Hosting