On 08/04/2016 10:31 AM, aki.tuomi@dovecot.fi wrote:
On August 4, 2016 at 7:38 PM aki.tuomi@dovecot.fi wrote:
On August 4, 2016 at 4:53 PM "Michael A. Peters" mpeters@domblogger.net wrote:
On 08/04/2016 06:50 AM, aki.tuomi@dovecot.fi wrote:
On August 4, 2016 at 4:19 PM "Michael A. Peters" mpeters@domblogger.net wrote:
On 08/04/2016 06:13 AM, Aki Tuomi wrote:
On 04.08.2016 16:11, Michael A. Peters wrote: > Operating system - 64 bit CentOS 7 > gcc-4.8.5-4.el7.x86_64 > > Building against LibreSSL which has been fine for other releases, but > it is a crypto test that is fails. > > Tried with LibreSSL 2.4.2 and 2.3.6 - both the build completes but > fails the make check > > Dovecot 2.2.24 passes make check on both. > > This is where it fails: > > Making check in lib-dcrypt > make[2]: Entering directory >
/home/alice/rpmbuild/BUILD/dovecot-2.2.25/src/lib-dcrypt' > for bin in test-crypto test-stream; do \ > if ! /bin/sh ../../run-test.sh ../.. ./$bin; then exit 1; fi; \ > done > ../../run-test.sh: line 21: 22369 Segmentation fault (core > dumped) valgrind -q --trace-children=yes --leak-check=full > --suppressions="$supp_path" --log-file=test.out.$$ $* > ==22369== Invalid read of size 8 > ==22369== at 0x113A47: dcrypt_ctx_sym_create (dcrypt.c:61) > ==22369== by 0x119194: test_cipher_test_vectors (test-crypto.c:60) > ==22369== by 0x1196F0: test_run_funcs (test-common.c:354) > ==22369== by 0x119FC0: test_run (test-common.c:404) > ==22369== by 0x113461: main (test-crypto.c:554) > ==22369== Address 0x8 is not stack'd, malloc'd or (recently) free'd > ==22369== > ==22369== > ==22369== Process terminating with default action of signal 11 (SIGSEGV) > ==22369== Access not within mapped region at address 0x8 > ==22369== at 0x113A47: dcrypt_ctx_sym_create (dcrypt.c:61) > ==22369== by 0x119194: test_cipher_test_vectors (test-crypto.c:60) > ==22369== by 0x1196F0: test_run_funcs (test-common.c:354) > ==22369== by 0x119FC0: test_run (test-common.c:404) > ==22369== by 0x113461: main (test-crypto.c:554) > ==22369== If you believe this happened as a result of a stack > ==22369== overflow in your program's main thread (unlikely but > ==22369== possible), you can try to increase the size of the > ==22369== main thread stack using the --main-stacksize= flag. > ==22369== The main thread stack size used in this run was 8388608. > Failed to run: ./test-crypto > make[2]: *** [check-test] Error 1 > make[2]: Leaving directory >
/home/alice/rpmbuild/BUILD/dovecot-2.2.25/src/lib-dcrypt' > make[1]: *** [check-recursive] Error 1 > make[1]: Leaving directory > `/home/alice/rpmbuild/BUILD/dovecot-2.2.25/src' > make: *** [check-recursive] Error 1 > error: Bad exit status from /var/tmp/rpm-tmp.Il5fdU (%check) > > Thanks for suggestions.Hi!
can you please provide stack trace with gdb?
gdb ./test-crypto r bt full
Aki
[alice@pern lib-dcrypt]$ gdb ./test-crypto GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /home/alice/rpmbuild/BUILD/dovecot-2.2.25/src/lib-dcrypt/test-crypto...done. (gdb) r Starting program: /home/alice/rpmbuild/BUILD/dovecot-2.2.25/src/lib-dcrypt/./test-crypto
Program received signal SIGSEGV, Segmentation fault. 0x000055555555fa47 in dcrypt_ctx_sym_create (algorithm=0x55555557c12e "AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT, ctx_r=0x7fffffffdf30, error_r=0x0) at dcrypt.c:61 61 return dcrypt_vfs->ctx_sym_create(algorithm, mode, ctx_r, error_r); Missing separate debuginfos, use: debuginfo-install glibc-2.17-106.el7_2.6.x86_64 (gdb) bt full #0 0x000055555555fa47 in dcrypt_ctx_sym_create (algorithm=0x55555557c12e "AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT, ctx_r=0x7fffffffdf30, error_r=0x0) at dcrypt.c:61 No locals.
Can you p dcrypt_vfs?
Aki
(gdb) p dcrypt_vfs $1 = (struct dcrypt_vfs *) 0x0 (gdb)
Af. This problem is because there is no openssl backend built with dcrypt, as we don't have libressl support officially. I'll add code that checks that if dcrypt initialization fails, the tests are skipped.
Aki
Fixed in https://github.com/dovecot/core/commit/b91d91633bf40f5fc8f962cc72faea8b867a1...
Aki
Thank you. I'll test it today.
I understand the limited resource issue and the large number of TLS implementations that exist.
For what its worth, I've been running Dovecot built against LibreSSL for almost a year now without any issues. Thank you.