Re: SSL connection reset by peer

2016-08-04 Thread Vince42
Hi,

[Olaf Hopp] - [2016-08-02 23:45]
> just a shot into the dark: if you are running out of entropy, you
> might get SSL errors. If this is a virtual machine, there are not
> many entropy sources. Consider installing alternative entropy sources
> like haveged(*), available in many distro repos.

Thank you for your hint. I followed the entropy idea when I first
encountered this strange behaviour, but there was no shortage.

Tweaking the parameters for the imap_login service seemed to fix the
problems, now I need to try to set them to reasonable values in order to
have the best compromise between "secure" and "high performance" as
described in the Dovecot wiki.

-- 
Cheers,\\|//
Vince  (o o)
ooO-(_)-Ooo-
 '''   (o)_(o)[ ][0][ ]
 ô¿ô   (=°o°=)   World Domination by Copy and Paste   [ ][ ][0]
  -(")_(")[0][0][0]

 ()  ascii ribbon campaign - against html e-mail
 /\  www.asciiribbon.org   - against proprietary attachments
   Ooo.
---.ooO(  )-
   (  )(_/
\_)


Re: file/folder perms permissions

2016-08-04 Thread Jos Chrispijn

In een bericht van 4-8-2016 17:05:


I am a bit confused. I manually messed with some files, and my MUA
complained about permissions. So I got that mess fixed, and in doing so
I noticed the seemingly contradictory permissions.


I can imagine the confusion. It all is depending on who/what installed 
the software. You have root/system permissions, user related and group 
related permissions.


Do not change permissions unless you know what you are doing!

/Jos


Re: Dovecot 2.2.25 test failure

2016-08-04 Thread Michael A. Peters

On 08/04/2016 10:31 AM, aki.tu...@dovecot.fi wrote:



On August 4, 2016 at 7:38 PM aki.tu...@dovecot.fi wrote:




On August 4, 2016 at 4:53 PM "Michael A. Peters"  wrote:


On 08/04/2016 06:50 AM, aki.tu...@dovecot.fi wrote:



On August 4, 2016 at 4:19 PM "Michael A. Peters"  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

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:
...
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.
0xfa47 in dcrypt_ctx_sym_create (algorithm=0x5557c12e
"AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT, ctx_r=0x7fffdf30,
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  0xfa47 in dcrypt_ctx_sym_create
(algorithm=0x5557c12e "AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT,
ctx_r=0x7fffdf30, 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/b91d91633bf40f5fc8f962cc72faea8b867a181a

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.


Re: Dovecot 2.2.25 test failure

2016-08-04 Thread aki . tuomi

> On August 4, 2016 at 7:38 PM aki.tu...@dovecot.fi wrote:
> 
> 
> 
> > On August 4, 2016 at 4:53 PM "Michael A. Peters"  
> > wrote:
> > 
> > 
> > On 08/04/2016 06:50 AM, aki.tu...@dovecot.fi wrote:
> > >
> > >> On August 4, 2016 at 4:19 PM "Michael A. Peters" 
> > >>  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
> > >> 
> > >> 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:
> > >> ...
> > >> 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.
> > >> 0xfa47 in dcrypt_ctx_sym_create (algorithm=0x5557c12e
> > >> "AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT, ctx_r=0x7fffdf30,
> > >> 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  0xfa47 in dcrypt_ctx_sym_create
> > >> (algorithm=0x5557c12e "AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT,
> > >> ctx_r=0x7fffdf30, error_r=0x0) at dcrypt.c:61
> > >> No locals.
> > >
> > > Can you p dcrypt_vfs?
> > >
> > > Aki
> > >
> > 
> > 

Re: Dovecot 2.2.25 test failure

2016-08-04 Thread aki . tuomi

> On August 4, 2016 at 4:53 PM "Michael A. Peters"  
> wrote:
> 
> 
> On 08/04/2016 06:50 AM, aki.tu...@dovecot.fi wrote:
> >
> >> On August 4, 2016 at 4:19 PM "Michael A. Peters"  
> >> 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
> >> 
> >> 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:
> >> ...
> >> 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.
> >> 0xfa47 in dcrypt_ctx_sym_create (algorithm=0x5557c12e
> >> "AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT, ctx_r=0x7fffdf30,
> >> 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  0xfa47 in dcrypt_ctx_sym_create
> >> (algorithm=0x5557c12e "AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT,
> >> ctx_r=0x7fffdf30, 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


file/folder perms permissions

2016-08-04 Thread Jim Pazarena

Forgive me if I am blind, but I cannot find default folder permissions.

For the home directories, with the sub of mail: and deeper, I see some 
files with 660, some with 600, some folders with 770 some with 660


I am a bit confused. I manually messed with some files, and my MUA 
complained about permissions. So I got that mess fixed, and in doing so 
I noticed the seemingly contradictory permissions.


Thanks!


Attachment Storage problems

2016-08-04 Thread Daniel van Ham Colchete
Guys,

I started using single instance attachment storage a while ago but I had
too many problems with it. My logs are filled with errors like:
Aug 03 18:41:38 imap(user@domain): Error:
read(attachments-connector(zlib(/srv/dovecot/mdbox/domain/user/storage/m.2)))
failed:
read(/srv/dovecot/attach/domain/5f/03/5f03f1d7da846fe9268473cae5219ae31019fd540dc67f58596d8390be4a0f2256158b1e9ba327841c513a6d927dbe9b767b7ad94f8ae5772674cccb3124b69d-7be2ef0e97036457c5209331bd36[base64:19
b/l]) failed:
open(/srv/dovecot/attach/domain/5f/03/5f03f1d7da846fe9268473cae5219ae31019fd540dc67f58596d8390be4a0f2256158b1e9ba327841c513a6d927dbe9b767b7ad94f8ae5772674cccb3124b69d-7be2ef0e97036457c5209331bd36)
failed: No such file or directory (uid=23484, box=INBOX)

The funny thing is that the directory /srv/dovecot/attach/domain/5f/03/
doesn't even exist!

So, I would like to stop using it and my question is: how? First we would
need to stop writting things there while still reading it. How can I tell
dovecot to stop using it on new e-mail?

Second would be a dsync-like migration reinserting the attachments on the
messages back. How can I do that? Most importantly, what do I do with the
messages that lost attachments?

Thank you very much.

Best,
Daniel Colchete


Re: Dovecot 2.2.25 test failure

2016-08-04 Thread Michael A. Peters

On 08/04/2016 06:50 AM, aki.tu...@dovecot.fi wrote:



On August 4, 2016 at 4:19 PM "Michael A. Peters"  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

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:
...
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.
0xfa47 in dcrypt_ctx_sym_create (algorithm=0x5557c12e
"AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT, ctx_r=0x7fffdf30,
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  0xfa47 in dcrypt_ctx_sym_create
(algorithm=0x5557c12e "AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT,
ctx_r=0x7fffdf30, 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)


Re: Dovecot 2.2.25 test failure

2016-08-04 Thread aki . tuomi

> On August 4, 2016 at 4:19 PM "Michael A. Peters"  
> 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 
> 
> 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:
> ...
> 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.
> 0xfa47 in dcrypt_ctx_sym_create (algorithm=0x5557c12e 
> "AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT, ctx_r=0x7fffdf30, 
> error_r=0x0) at dcrypt.c:61
> 61return 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  0xfa47 in dcrypt_ctx_sym_create 
> (algorithm=0x5557c12e "AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT, 
> ctx_r=0x7fffdf30, error_r=0x0) at dcrypt.c:61
> No locals.

Can you p dcrypt_vfs? 

Aki


Re: Dovecot 2.2.25 test failure

2016-08-04 Thread Michael A. Peters

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 


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:
...
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.
0xfa47 in dcrypt_ctx_sym_create (algorithm=0x5557c12e 
"AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT, ctx_r=0x7fffdf30, 
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  0xfa47 in dcrypt_ctx_sym_create 
(algorithm=0x5557c12e "AES-128-CBC", mode=DCRYPT_MODE_ENCRYPT, 
ctx_r=0x7fffdf30, error_r=0x0) at dcrypt.c:61

No locals.
#1  0x55565195 in test_cipher_test_vectors () at test-crypto.c:60
ctx = 0x57a6911f
i = 0
vectors = {{key = 0x5557dd48 
"2b7e151628aed2a6abf7158809cf4f3c", iv = 0x5557dd70 
"000102030405060708090a0b0c0d0e0f", pt = 0x5557dd98 
"6bc1bee22e409f96e93d7e117393172a",
ct = 0x5557ddc0 "7649abac8119b246cee98e9b12e9197d"}, 
{key = 0x5557dd48 "2b7e151628aed2a6abf7158809cf4f3c", iv = 
0x5557dde8 "7649ABAC8119B246CEE98E9B12E9197D",
pt = 0x5557de10 "ae2d8a571e03ac9c9eb76fac45af8e51", ct 
= 0x5557de38 "5086cb9b507219ee95db113a917678b2"}}

key = 0x5578e0f0
iv = 0x5578e158
pt = 0x5578e1c0
ct = 0x5578e228
res_enc = 0x5578e290
res_dec = 0x5578e308
#2  0x555656f1 in test_run_funcs 
(test_functions=test_functions@entry=0x5578b020 
) at test-common.c:354

_data_stack_cur_id = 2
i = 0
#3  0x55565fc1 in test_run (test_functions=0x5578b020 
) at test-common.c:404

No locals.
#4  0xf462 in main () at test-crypto.c:554
test_functions = {0x55565050 , 
0x55564b90 , 0x55564970 
,
  

Re: Dovecot 2.2.25 test failure

2016-08-04 Thread Aki Tuomi


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


Dovecot 2.2.25 test failure

2016-08-04 Thread Michael A. Peters

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.