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]

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

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

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

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:

The bug happens with qtox package, with qtox-alpha package and with self
compiled qtox from git 6b51381980e4d742efff0905a697040efbcce049

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/".
[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
[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:

[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/
(gdb) bt full
#0 0x00007ffff3c2f75d in EVP_EncryptUpdate ()
at /usr/lib/x86_64-linux-gnu/
#1 0x00007ffff3f79e3b in sqlcipher_openssl_cipher (ctx=0x7fffb801aaa8,
mode=<optimized out>, key=0x7fffb801aac8
key_sz=<optimized out>, iv=0x7fffb80165c8
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
hmac_in = <optimized out>
hmac_out = 0x7fffb80165d8
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/
#17 0x00007fffefd7db2c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
at /usr/lib/x86_64-linux-gnu/
#18 0x00007fffefd852e1 in QApplication::notify(QObject*, QEvent*) ()
at /usr/lib/x86_64-linux-gnu/
#19 0x00007fffef32a990 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
---Type <return> to continue, or q <return> to quit---
at /usr/lib/x86_64-linux-gnu/
#20 0x00007fffef32d11d in QCoreApplicationPrivate::sendPostedEvents(QObject*,
int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/
#21 0x00007fffef37ebf3 in () at /usr/lib/x86_64-linux-gnu/
#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/
#27 0x00007fffef32897a in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
#28 0x00007fffef1560f3 in QThread::exec() ()
at /usr/lib/x86_64-linux-gnu/
#29 0x00007fffef15ada8 in () at /usr/lib/x86_64-linux-gnu/
#30 0x00007fffeec24464 in start_thread (arg=0x7fffc1db1700) at
__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
(gdb) quit
A debugging session is active.

Inferior 1 [process 29063] will be killed.

Quit anyway? (y or n) y


-- 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

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
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])

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]>
libsqlcipher-dev - SQLCipher development files
libsqlcipher0 - SQLCipher shared library
sqlcipher - Command line interface for SQLCipher
Closes: 850421 859685
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)
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
c1ac068ae0657076ac56f8be1ff02514aa8a12ad28e7228856a823699e7580e9 2335
4172cc6e5a79d36e178d36bd5cc467a938e08368952659bcd95eccbaf0fa4ad4 13873645
4e931aeade93d8211217fa2ca9d69fcf217103307a3b70f8a8ad152419b75f98 14408
701ddc5e238384b1883603cc8bc230df99e6785b008aa6be2c02b204ebc79ee4 5794
c83c03793d9b581c35e188455a5d58e0 2335 devel optional sqlcipher_3.4.1-1.dsc
edd1c57129c21a22ab2c2fd7f47d4ccd 13873645 devel optional
fad3b12e4c647d60f437e11156e7258c 14408 devel optional
2a1a883c75ee5f861f7c62f47c75285a 5794 devel optional


--- End Message ---

Programming list archiving by: Enterprise Git Hosting