Newest RHEL/CentOS openssl update breaks mysql DHE
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
|||
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
High
|
Laurynas Biveinis | ||
5.5 |
Fix Released
|
High
|
Laurynas Biveinis | ||
5.6 |
Fix Released
|
High
|
Laurynas Biveinis |
Bug Description
This is a problem in upstream as well, I am pretty sure:
The newest RHEL/CentOS/SL 6.6 openssl package (1.0.1e-30.el6_6.9 ; published around 6/4/2015) contains a fix for CVE-2015-4000 . RedHat's fix for this was to limit the use of any SSL DH key sizes to a minimum of 768 bits. This breaks any DHE SSL ciphers for MySQL clients as soon as you install the openssl update, since in vio/viosslfacto
We should probably include and/or upstream this patch:
https:/
Example:
If a user in a Percona 5.6.23-72.1-log server is setup with grant "require SSL", and the client (using the updated openssl package) executes:
# mysql -u user -h serverhostname --ssl --ssl-cipher=
Enter password:
ERROR 2026 (HY000): SSL connection error: error:00000001:
This will occur for any DHE cipher. Using a non-DHE cipher will work as expected.
Workaround:
* Downgrade the client openssl package to any version before 1.0.1e-30.el6_6.9; e.g. 0:1.0.1e-30.el6_6.8
* Alternatively, do not use DH ciphers. This is not acceptable because the supported non-DH ciphers do not afford any PFS protection.
Solution is for the server to present a 1024 bit DH param. This would:
* Avoid the problem with "fixed" client libraries.
* Still be small enough to avoid problems with some clients (e.g. older Java versions do not like DH params > 1024 bit)
* Improve security in general.
It's clear that both upstream MySQL and Percona Server are ffected (I've checked 5.6 branches below):
[openxs@chief mysql-server]$ git pull src/yassl. cpp:89: static unsigned char dh512_p[] = src/yassl. cpp:105: base.dh_->p = BN_bin2bn(dh512_p, sizeof(dh512_p), 0); ries.c: 23:static unsigned char dh512_p[]= ries.c: 42: dh->p=BN_ bin2bn( dh512_p, sizeof( dh512_p) ,NULL); testsuite/ test.hpp: 486: static unsigned char dh1024_p[] = testsuite/ test.hpp: 508: dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0); src/yassl. cpp:89: static unsigned char dh512_p[] = src/yassl. cpp:105: base.dh_->p = BN_bin2bn(dh512_p, sizeof(dh512_p), 0); ries.c: 23:static unsigned char dh512_p[]= ries.c: 42: dh->p=BN_ bin2bn( dh512_p, sizeof( dh512_p) ,NULL); testsuite/ test.hpp: 486: static unsigned char dh1024_p[] = testsuite/ test.hpp: 508: dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0);
Already up-to-date.
[openxs@chief mysql-server]$ grep -rn dh512_p *
extra/yassl/
extra/yassl/
vio/viosslfacto
vio/viosslfacto
[openxs@chief mysql-server]$ grep -rn dh1024_p *
extra/yassl/
extra/yassl/
[openxs@chief mysql-server]$ cd ../percona-server/
[openxs@chief percona-server]$ grep -rn dh512_p *
extra/yassl/
extra/yassl/
vio/viosslfacto
vio/viosslfacto
[openxs@chief percona-server]$ grep -rn dh1024_p *
extra/yassl/
extra/yassl/
[openxs@chief percona-server]$ git branch
* 5.6
Do you prefer to report upstream bug yourself to get a credit?