Re: test-crypto.c - Assert failed

2022-07-27 Thread Michael Slusarz
> On 07/27/2022 12:50 AM MDT Tamsy  wrote:
> 
> On a new standard Ubuntu 22.04 LTS installation Dovecot's "configure &&
> make" runs through but "make check" fails.
> 
> Is dovecot-2.3.19.1 not yet compatible with openSSL 3.0.2 (openssl
> 3.0.2-0ubuntu1.6) or is this just happening here?

As has been discussed on this list previously, Dovecot 2.3.x is not (yet) fully 
compatible with openSSL 3.

michael


Re: test-crypto.c - Assert failed

2022-07-27 Thread Tamsy


 Original Message 
From: Tamsy [mailto:dovecot-l...@mohtex.net]
Sent: Wednesday, July 27, 2022 at 11:31
To: Dovecot
Subject: test-crypto.c - Assert failed

Dear List,

Please pardon me if this has been already discussed before. I couldn't
find the matter with a quick search.

On a new standard Ubuntu 22.04 LTS installation Dovecot's "configure &&
make" runs through but "make check" fails.

Is dovecot-2.3.19.1 not yet compatible with openSSL 3.0.2 (openssl
3.0.2-0ubuntu1.6) or is this just happening here?


Distributor ID: Ubuntu
Description:    Ubuntu 22.04 LTS
Release:    22.04
Codename:   jammy

Linux 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022
x86_64 x86_64 x86_64 GNU/Linux


$ make check


test_cipher_test_vectors . : ok
test_cipher_aead_test_vectors  : ok
test_hmac_test_vectors ... : ok
test_load_v1_keys  : ok
test_load_v1_key . : ok
test_load_v1_public_key .. : ok
test_load_v2_key . : ok
test_load_v2_public_key .. : ok
test_get_info_v2_key . : ok
test_gen_and_get_info_rsa_pem  : ok
test_get_info_rsa_private_key  : ok
test_get_info_invalid_keys ... : ok
test_get_info_key_encrypted .. : ok
test_get_info_pw_encrypted ... : ok
test-crypto.c:827: Assert failed: ret == TRUE
Panic: file dcrypt-openssl.c: line 2639
(dcrypt_openssl_private_to_public_key): assertion failed: (priv_key !=
NULL && pub_key_r != NULL)
Error: Raw backtrace: ./test-crypto(+0x60704) [0x168704] ->
./test-crypto(backtrace_append+0x1c) [0x168893] ->
./test-crypto(backtrace_get+0x2a) [0x1688bf] -> ./test-crypto(+0x28ef4)
[0x130ef4] -> ./test-crypto(default_fatal_handler+0) [0x130fc6] ->
./test-crypto(default_error_handler+0) [0x131014] ->
./test-crypto(i_fatal+0) [0x1312ae] ->
.libs/libdcrypt_openssl.so(+0xe795) [0x4ea3795] ->
./test-crypto(dcrypt_key_convert_private_to_public+0x7b) [0x11eeb1] ->
./test-crypto(+0x21655) [0x129655] -> ./test-crypto(+0x23d66) [0x12bd66]
-> ./test-crypto(test_run+0x21) [0x12c13a] -> ./test-crypto(main+0x83)
[0x12af16] -> /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x4893d90] ->
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x4893e40] ->
./test-crypto(_start+0x25) [0x11c1a5]
../../run-test.sh: line 39: 164971 Aborted (core dumped)
/usr/bin/valgrind -q $trace_children --error-exitcode=213
--leak-check=full --gen-suppressions=all --suppressions="$supp_path"
--log-file=$test_out $noundef $*
==164971== Conditional jump or move depends on uninitialised value(s)
==164971==    at 0x514E234: ??? (in
/usr/lib/x86_64-linux-gnu/libcrypto.so.3)
==164971==    by 0x514E511: ??? (in
/usr/lib/x86_64-linux-gnu/libcrypto.so.3)
==164971==    by 0x504F0F4: EVP_DecryptFinal_ex (in
/usr/lib/x86_64-linux-gnu/libcrypto.so.3)
==164971==    by 0x4E9CD3F: dcrypt_openssl_ctx_sym_final (in
/usr/local/src/dovecot-2.3.19.1/src/lib-dcrypt/.libs/libdcrypt_openssl.so)
==164971==    by 0x11E3DB: dcrypt_ctx_sym_final (in
/usr/local/src/dovecot-2.3.19.1/src/lib-dcrypt/test-crypto)
==164971==    by 0x1270DE: test_cipher_aead_test_vectors (in
/usr/local/src/dovecot-2.3.19.1/src/lib-dcrypt/test-crypto)
==164971==    by 0x12BD65: test_run_funcs (in
/usr/local/src/dovecot-2.3.19.1/src/lib-dcrypt/test-crypto)
==164971==    by 0x12C139: test_run (in
/usr/local/src/dovecot-2.3.19.1/src/lib-dcrypt/test-crypto)
==164971==    by 0x12AF15: main (in
/usr/local/src/dovecot-2.3.19.1/src/lib-dcrypt/test-crypto)
==164971==
{
    
    Memcheck:Cond
    obj:/usr/lib/x86_64-linux-gnu/libcrypto.so.3
    obj:/usr/lib/x86_64-linux-gnu/libcrypto.so.3
    fun:EVP_DecryptFinal_ex
    fun:dcrypt_openssl_ctx_sym_final
    fun:dcrypt_ctx_sym_final
    fun:test_cipher_aead_test_vectors
    fun:test_run_funcs
    fun:test_run
    fun:main
}
==164971== 2,304 bytes in 1 blocks are possibly lost in loss record 911
of 947
==164971==    at 0x4848899: malloc (in
/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==164971==    by 0x4005D97: malloc (rtld-malloc.h:56)
==164971==    by 0x4005D97: _dlfo_mappings_segment_allocate
(dl-find_object.c:217)
==164971==    by 0x4005D97: _dl_find_object_update_1 (dl-find_object.c:671)
==164971==    by 0x4005D97: _dl_find_object_update (dl-find_object.c:804)
==164971==    by 0x400ECCF: dl_open_worker_begin (dl-open.c:735)
==164971==    by 0x49DEC27: _dl_catch_exception (d

test-crypto.c - Assert failed

2022-07-26 Thread Tamsy

Dear List,

Please pardon me if this has been already discussed before. I couldn't 
find the matter with a quick search.


On a new standard Ubuntu 22.04 LTS installation Dovecot's "configure && 
make" runs through but "make check" fails.


Is dovecot-2.3.19.1 not yet compatible with openSSL 3.0.2 (openssl 
3.0.2-0ubuntu1.6) or is this just happening here?



Distributor ID: Ubuntu
Description:Ubuntu 22.04 LTS
Release:22.04
Codename:   jammy

Linux 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 
x86_64 x86_64 x86_64 GNU/Linux



$ make check


test_cipher_test_vectors . : ok
test_cipher_aead_test_vectors  : ok
test_hmac_test_vectors ... : ok
test_load_v1_keys  : ok
test_load_v1_key . : ok
test_load_v1_public_key .. : ok
test_load_v2_key . : ok
test_load_v2_public_key .. : ok
test_get_info_v2_key . : ok
test_gen_and_get_info_rsa_pem  : ok
test_get_info_rsa_private_key  : ok
test_get_info_invalid_keys ... : ok
test_get_info_key_encrypted .. : ok
test_get_info_pw_encrypted ... : ok
test-crypto.c:827: Assert failed: ret == TRUE
Panic: file dcrypt-openssl.c: line 2639 
(dcrypt_openssl_private_to_public_key): assertion failed: (priv_key != 
NULL && pub_key_r != NULL)
Error: Raw backtrace: ./test-crypto(+0x60704) [0x168704] -> 
./test-crypto(backtrace_append+0x1c) [0x168893] -> 
./test-crypto(backtrace_get+0x2a) [0x1688bf] -> ./test-crypto(+0x28ef4) 
[0x130ef4] -> ./test-crypto(default_fatal_handler+0) [0x130fc6] -> 
./test-crypto(default_error_handler+0) [0x131014] -> 
./test-crypto(i_fatal+0) [0x1312ae] -> 
.libs/libdcrypt_openssl.so(+0xe795) [0x4ea3795] -> 
./test-crypto(dcrypt_key_convert_private_to_public+0x7b) [0x11eeb1] -> 
./test-crypto(+0x21655) [0x129655] -> ./test-crypto(+0x23d66) [0x12bd66] 
-> ./test-crypto(test_run+0x21) [0x12c13a] -> ./test-crypto(main+0x83) 
[0x12af16] -> /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x4893d90] -> 
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x4893e40] -> 
./test-crypto(_start+0x25) [0x11c1a5]
../../run-test.sh: line 39: 164971 Aborted (core dumped) 
/usr/bin/valgrind -q $trace_children --error-exitcode=213 
--leak-check=full --gen-suppressions=all --suppressions="$supp_path" 
--log-file=$test_out $noundef $*

==164971== Conditional jump or move depends on uninitialised value(s)
==164971==at 0x514E234: ??? (in 
/usr/lib/x86_64-linux-gnu/libcrypto.so.3)
==164971==by 0x514E511: ??? (in 
/usr/lib/x86_64-linux-gnu/libcrypto.so.3)
==164971==by 0x504F0F4: EVP_DecryptFinal_ex (in 
/usr/lib/x86_64-linux-gnu/libcrypto.so.3)
==164971==by 0x4E9CD3F: dcrypt_openssl_ctx_sym_final (in 
/usr/local/src/dovecot-2.3.19.1/src/lib-dcrypt/.libs/libdcrypt_openssl.so)
==164971==by 0x11E3DB: dcrypt_ctx_sym_final (in 
/usr/local/src/dovecot-2.3.19.1/src/lib-dcrypt/test-crypto)
==164971==by 0x1270DE: test_cipher_aead_test_vectors (in 
/usr/local/src/dovecot-2.3.19.1/src/lib-dcrypt/test-crypto)
==164971==by 0x12BD65: test_run_funcs (in 
/usr/local/src/dovecot-2.3.19.1/src/lib-dcrypt/test-crypto)
==164971==by 0x12C139: test_run (in 
/usr/local/src/dovecot-2.3.19.1/src/lib-dcrypt/test-crypto)
==164971==by 0x12AF15: main (in 
/usr/local/src/dovecot-2.3.19.1/src/lib-dcrypt/test-crypto)

==164971==
{
   
   Memcheck:Cond
   obj:/usr/lib/x86_64-linux-gnu/libcrypto.so.3
   obj:/usr/lib/x86_64-linux-gnu/libcrypto.so.3
   fun:EVP_DecryptFinal_ex
   fun:dcrypt_openssl_ctx_sym_final
   fun:dcrypt_ctx_sym_final
   fun:test_cipher_aead_test_vectors
   fun:test_run_funcs
   fun:test_run
   fun:main
}
==164971== 2,304 bytes in 1 blocks are possibly lost in loss record 911 
of 947
==164971==at 0x4848899: malloc (in 
/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)

==164971==by 0x4005D97: malloc (rtld-malloc.h:56)
==164971==by 0x4005D97: _dlfo_mappings_segment_allocate 
(dl-find_object.c:217)

==164971==by 0x4005D97: _dl_find_object_update_1 (dl-find_object.c:671)
==164971==by 0x4005D97: _dl_find_object_update (dl-find_object.c:804)
==164971==by 0x400ECCF: dl_open_worker_begin (dl-open.c:735)
==164971==by 0x49DEC27: _dl_catch_exception (dl-error-skeleton.c:208)
==164971==by 0x400DF99: dl_open_worker (dl-open.c:782)
==164971==by 0x49DEC27: _dl_catch_exception (dl-error-skeleton.c:208)
==164971==by 0x400E34D: _dl_open (dl-open.c:883)
==164971==by