Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 552266 - net-mail/courier-imap Minimal DHE key length of 1,024 bits
Summary: net-mail/courier-imap Minimal DHE key length of 1,024 bits
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 554894 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-06-16 09:21 UTC by Octavian
Modified: 2016-08-10 19:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to change the default to 2048 (courier-imap-4.15-dhparams-2048.patch,276 bytes, patch)
2015-07-14 13:44 UTC, Philippe Chaintreuil
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Octavian 2015-06-16 09:21:42 UTC
Default for DHE key length is 768. It needs to be changed to at least 1024. For more info see https://weakdh.org/

Regenerating the key is quite simple:
DH_BITS=1024 mkdhparams

Suggest running that at the end of installation. Otherwise some e-mail programs will refuse to connect. 

see also: 
https://forums.gentoo.org/viewtopic-p-7764834.html#7764834
Comment 1 Alex Legler (RETIRED) archtester gentoo-dev Security 2015-07-14 13:35:00 UTC
*** Bug 554894 has been marked as a duplicate of this bug. ***
Comment 2 Philippe Chaintreuil 2015-07-14 13:44:13 UTC
Created attachment 406792 [details, diff]
Patch to change the default to 2048

Attaching patch that changes mkdhparams's default from 768 to 2048-bits.
Comment 3 Philippe Chaintreuil 2015-07-14 13:47:38 UTC
Also of note: Mozilla Thunderbird will no longer connect to servers with DHE key's that are this weak (< 1024-bits).

You'll get errors like this in your courier logs:

=========================================================================
Jul 14 09:26:15 hostname imapd-ssl[14260]: couriertls: accept: error:14094417:SSL routines:SSL3_READ_BYTES:sslv3 alert illegal parameter
Jul 14 09:26:15 hostname imapd-ssl[14260]: couriertls: accept: Connection reset by peer
=========================================================================
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2015-07-16 13:31:37 UTC
Could the proxy maintainer acquire and runtest these patches?
Comment 5 Manuel Rüger (RETIRED) gentoo-dev 2015-07-16 13:41:51 UTC
(In reply to Ian Delaney from comment #4)
> Could the proxy maintainer acquire and runtest these patches?

Are you talking about yourself? Because in fact you are the proxy maintainer and not the maintainer that takes care of the package.
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2015-07-16 16:27:33 UTC
        <herd>proxy-maintainers</herd>
        <maintainer>
                <email>david@ixit.cz</email>
                <name>David Heidelberg</name>

This is the proxy maintainer. So no.
Comment 7 Anthony de Boer 2015-07-26 21:44:06 UTC
Note the longer DH size also needs to go into /usr/sbin/mkimapdcert (see the gendh line) for imaps service; mkdhparams appears to be for starttls service.
Comment 8 Ian Delaney (RETIRED) gentoo-dev 2015-07-28 15:27:58 UTC
To begin with, courier-imap-4.16.0 failed with courier-unicode-1.3 which wrongly names a header file courier-unicode.h. It requires a border version of 
=net-libs/courier-unicode-1.1

The file courier-imap-4.16.0/mkdhparams does not exist on src_unpack.  It is generated by the build.  The patch, therefore, submitted  in Comment 2 does not work since a patch is run in src_prepare.  The files that builds mkdhparams needs instead to be patched. I suspect the pertient files are 
courier-imap-4.16.0/aclocal.m4 and or courier-imap-4.16.0/configure

$ grep "768" /mnt/gen2/TmpDir/portage/net-mail/courier-imap-4.16.0/work/courier-imap-4.16.0/*
/mnt/gen2/TmpDir/portage/net-mail/courier-imap-4.16.0/work/courier-imap-4.16.0/aclocal.m4:      lt_cv_sys_max_cmd_len=32768
/mnt/gen2/TmpDir/portage/net-mail/courier-imap-4.16.0/work/courier-imap-4.16.0/configure:      lt_cv_sys_max_cmd_len=32768

These 768 may be split off from the 32 in the build.  There are other files in subfolders with similar or same.

Either way, upstream should be notified with a bug to fix the build system and reset this to 2048 it this is the correct setting. 

Currently this package has neither a participating (user) maintainer or a usable patch to fix the build.
Comment 9 Pacho Ramos gentoo-dev 2016-08-09 09:07:20 UTC
does 4.16.2-r1 still need this patch?
Comment 10 Philippe Chaintreuil 2016-08-09 13:47:24 UTC
(In reply to Pacho Ramos from comment #9)
> does 4.16.2-r1 still need this patch?

It does not appear the patch is needed in 4.16.2-r1 as upstream has increased the default to 2048.
Comment 11 Pacho Ramos gentoo-dev 2016-08-10 19:09:33 UTC
ok, we will stabilize a newer version in a different bug

Thanks for feedback