Dovecot 2.2.25 test failure

Michael A. Peters mpeters at domblogger.net
Thu Aug 4 13:19:13 UTC 2016


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 at 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.
#1  0x0000555555565195 in test_cipher_test_vectors () at test-crypto.c:60
         ctx = 0x57a6911f
         i = 0
         vectors = {{key = 0x55555557dd48 
"2b7e151628aed2a6abf7158809cf4f3c", iv = 0x55555557dd70 
"000102030405060708090a0b0c0d0e0f", pt = 0x55555557dd98 
"6bc1bee22e409f96e93d7e117393172a",
             ct = 0x55555557ddc0 "7649abac8119b246cee98e9b12e9197d"}, 
{key = 0x55555557dd48 "2b7e151628aed2a6abf7158809cf4f3c", iv = 
0x55555557dde8 "7649ABAC8119B246CEE98E9B12E9197D",
             pt = 0x55555557de10 "ae2d8a571e03ac9c9eb76fac45af8e51", ct 
= 0x55555557de38 "5086cb9b507219ee95db113a917678b2"}}
         key = 0x55555578e0f0
         iv = 0x55555578e158
         pt = 0x55555578e1c0
         ct = 0x55555578e228
         res_enc = 0x55555578e290
         res_dec = 0x55555578e308
#2  0x00005555555656f1 in test_run_funcs 
(test_functions=test_functions at entry=0x55555578b020 
<test_functions.5619>) at test-common.c:354
         _data_stack_cur_id = 2
         i = 0
#3  0x0000555555565fc1 in test_run (test_functions=0x55555578b020 
<test_functions.5619>) at test-common.c:404
No locals.
#4  0x000055555555f462 in main () at test-crypto.c:554
         test_functions = {0x555555565050 <test_cipher_test_vectors>, 
0x555555564b90 <test_cipher_aead_test_vectors>, 0x555555564970 
<test_hmac_test_vectors>,
           0x555555563990 <test_load_v1_keys>, 0x555555564660 
<test_load_v1_key>, 0x5555555643b0 <test_load_v1_public_key>, 
0x555555563f90 <test_load_v2_key>,
           0x555555563840 <test_load_v2_public_key>, 0x555555563670 
<test_get_info_v2_key>, 0x555555563280 <test_gen_and_get_info_rsa_pem>, 0x0}
         ret = <optimized out>
(gdb)


More information about the dovecot mailing list