Commit graph

682 commits

Author SHA1 Message Date
Sergei Golubchik
ae29ea2d86 Merge branch 'mysql/5.5' into 5.5 2016-06-14 13:55:28 +02:00
Arun Kuruvila
c7e68606c0 Bug#21920657: SSL-CA FAILS SILENTLY IF THE PATH CANNOT BE
FOUND

Description:- Failure during the validation of CA
certificate path which is provided as an option for 'ssl-ca'
returns two different errors for YaSSL and OPENSSL.

Analysis:- 'ssl-ca', option used for specifying the ssl ca
certificate path. Failing to validate this certificate with
OPENSSL returns an error, "ERROR 2026 (HY000): SSL
connection error: SSL_CTX_set_default_verify_paths failed".
While YASSL returns "ERROR 2026 (HY000): SSL connection
error: ASN: bad other signature confirmation". Error
returned by the OPENSSL is correct since
"SSL_CTX_load_verify_locations()" returns 0 (in case of
OPENSSL) for the failure and sets error as
"SSL_INITERR_BAD_PATHS". In case of YASSL,
"SSL_CTX_load_verify_locations()" returns an error number
which is less than or equal to 0 in case of error. Error
numbers for YASSL is mentioned in the file,
'extra/yassl/include/openssl/ssl.h'(line no : 292). Also
'ssl-ca' does not accept tilde home directory path
substitution.

Fix:- The condition which checks for the error in the
"SSL_CTX_load_verify_locations()" is changed in order to
accommodate YASSL as well. A logic is written in
"mysql_ssl_set()" in order accept the tilde home directory
path substitution for all ssl options.
2016-03-01 10:17:25 +05:30
Sergei Golubchik
a90da6e053 MDEV-9314 fatal build error: viosslfactories.c:58:5: error: dereferencing pointer to incomplete type ‘DH {aka struct dh_st}
fixes for openssl that was built with -DOPENSSL_NO_DEPRECATED
2016-02-06 11:45:23 +01:00
Sergei Golubchik
2721d69f79 MDEV-8352 Increase Diffie-Helman modulus to 2048-bits 2015-07-31 17:17:33 +02:00
V S Murthy Sidagam
dbbe747e54 Bug #21221862 NEWEST RHEL/CENTOS OPENSSL UPDATE BREAKS MYSQL DHE CIPHERS
Description: 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
LogJam. 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/viosslfactories.c, the default
DHPARAM is a 512 bit one. This cannot be changed in
configuration/runtime; and needs a recompile. Because of this the
client connection with --ssl-cipher=DHE-RSA-AES256-SHA is not
able to connect the server.

Analysis: Openssl has changed Diffie-Hellman key from the 512 to
1024 due to some reasons(please see the details at
http://openssl.org/news/secadv_20150611.txt) Because of this the client
with DHE cipher is failing to connect the server. This change took
place from the openssl-1.0.1n onwards.

Fix: Similar bug fix is already pushed to mysql-5.7 under bug#18367167.
Hence we backported the same fix to mysql-5.5 and mysql-5.6.
2015-06-19 08:26:33 +05:30
Sergei Golubchik
56e2d8318b MDEV-7695 MariaDB - ssl - fips: can not connect with --ssl-cipher=DHE-RSA-AES256-SHA - handshake failure
Change 512bit DH key to 1024bit to meet FIPS requirements
2015-06-09 14:44:04 +02:00
V S Murthy Sidagam
6c11fedb5e Bug #16861371 SSL_OP_NO_COMPRESSION NOT DEFINED
post push change: fixing valgrind failures
2015-04-21 09:24:41 +05:30
V S Murthy Sidagam
f07d995799 Bug #16861371 SSL_OP_NO_COMPRESSION NOT DEFINED
post push change: missed the change in mysql-5.5
(Fixing compiler warning/error)
2015-04-20 19:41:50 +05:30
V S Murthy Sidagam
e7ad7f050e Bug #16861371 SSL_OP_NO_COMPRESSION NOT DEFINED
Description:
Can't build mysql-5.5 latest source with openssl 0.9.8e.

Analysis:
Older OpenSSL versions(prior to openssl 1.0) doesn't have 'SSL_OP_NO_COMPRESSION' defined.
Hence the build is failing with SSL_OP_NO_COMPRESSION undeclared.

Fix:
Added a conditonal compilation for 'SSL_OP_NO_COMPRESSION'.
i.e if 'SSL_OP_NO_COMPRESSION' is defined then have the SSL_set_options call for OpenSSL 1.0 versions.
Have sk_SSL_COMP_zero() call for OpenSSL 0.9.8 version
2015-04-20 16:46:36 +05:30
Sergei Golubchik
8e80f91fa3 Merge remote-tracking branch 'mysql/5.5' into bb-5.5-merge @ mysql-5.5.42 2015-02-11 23:50:40 +01:00
Harin Vadodaria
fe4c4ab914 Bug#19820550 : DISABLE SSL 3.0 SUPPORT IN OPENSSL
Explicitly disable weaker SSL protocols.
2015-01-02 10:18:04 +05:30
Sergei Golubchik
d851d5e70c MDEV-6975 Implement TLS protocol
followup:
* explicitly disable SSLv2 and SSLv3, keep other protocols enabled
* fix a compiler warning
* rename the test and combinations to avoid confusion

vio/viossl.c:
  fix a compiler warning
2014-11-19 18:54:02 +01:00
Sergei Golubchik
cb8f837a3d MDEV-6975 Implement TLS protocol
change SSL methods to be SSLv23 (according to openssl manpage:
"A TLS/SSL connection established with these methods may understand
the SSLv2, SSLv3, TLSv1, TLSv1.1 and TLSv1.2 protocols") from
TLSv1 methods, that go back to the initial SSL implementation
in MySQL in 2001.

OpenSSL default ciphers are different if TLSv1.2 is enabled,
so tests need to take this into account.
2014-11-18 17:57:06 +01:00
Sergei Golubchik
c8fa6f782c improve OpenSSL error reporting
e.g. from "error:00000001:lib(0):func(0):reason(1)"
to "error:140830B5:SSL routines:SSL3_CLIENT_HELLO:no ciphers available"
2014-11-18 17:56:49 +01:00
Sergei Golubchik
1c6ad62a26 mysql-5.5.39 merge
~40% bugfixed(*) applied
~40$ bugfixed reverted (incorrect or we're not buggy)
~20% bugfixed applied, despite us being not buggy
(*) only changes in the server code, e.g. not cmakefiles
2014-08-02 21:26:16 +02:00
Tor Didriksen
918837f728 Backport from trunk:
Bug#18187290 ISSUE WITH BUILDING MYSQL USING CMAKE 2.8.12

We want to upgrade to VS2013 on Windows.
In order to do this, we need to upgrade to cmake 2.8.12
This has introduced some incompatibilities for .pdb files,
and "make install" no longer works.

To reproduce:
  cmake --build . --target package --config debug

The fix:
Rather than installing .pdb files for static libraries, we use the /Z7 flag
to store symbolic debugging information in the .obj files.
2014-05-07 17:09:14 +02:00
Tor Didriksen
3e96ec0ef9 Backport from trunk:
Bug#18187290 ISSUE WITH BUILDING MYSQL USING CMAKE 2.8.12

We want to upgrade to VS2013 on Windows.
In order to do this, we need to upgrade to cmake 2.8.12
This has introduced some incompatibilities for .pdb files,
and "make install" no longer works.

To reproduce:
  cmake --build . --target package --config debug

The fix:
Rather than installing .pdb files for static libraries, we use the /Z7 flag
to store symbolic debugging information in the .obj files.
2014-05-07 17:09:14 +02:00
Sergei Golubchik
84651126c0 MySQL-5.5.36 merge
(without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
2014-02-17 11:00:51 +01:00
Sergei Golubchik
37d240ecf9 MySQL-5.5.35 merge 2014-01-22 15:29:36 +01:00
Murthy Narkedimilli
c92223e198 Updated/added copyright headers 2014-01-06 10:52:35 +05:30
Murthy Narkedimilli
496abd0814 Updated/added copyright headers 2014-01-06 10:52:35 +05:30
Alexander Barkov
11005f3413 Merge 5.3->5.5 2013-10-16 18:17:51 +04:00
Alexander Barkov
049000101a Merge 5.1 -> 5.3 2013-10-16 17:48:31 +04:00
Alexander Barkov
de4ca539b8 MDEV-4890 Valgrind warnings on shutdown on a build with openSSL 2013-10-16 17:37:11 +04:00
Sreedhar.S
c8c948ffa6 Bug 13878021 - WINDOWS PACKAGE THAT INCLUDES .PDB FILES FOR INTERMEDIATE LIBRARIES USED 2013-10-09 11:10:46 +05:30
Sreedhar.S
faca34da04 Bug 13878021 - WINDOWS PACKAGE THAT INCLUDES .PDB FILES FOR INTERMEDIATE LIBRARIES USED 2013-10-09 11:10:46 +05:30
Raghav Kapoor
facdeb5ffc BUG#17294150-POTENTIAL CRASH DUE TO BUFFER OVERRUN IN SSL
ERROR HANDLING CODE 

BACKGROUND:
There can be a potential crash due to buffer overrun in 
SSL error handling code due to missing comma in
ssl_error_string[] array in viosslfactories.c.

ANALYSIS:
Found by code Inspection.

FIX:
Added the missing comma in SSL error handling code
in ssl_error_string[] array in viosslfactories.c.
2013-08-28 15:19:30 +05:30
Raghav Kapoor
efb6a1d070 BUG#17294150-POTENTIAL CRASH DUE TO BUFFER OVERRUN IN SSL
ERROR HANDLING CODE 

BACKGROUND:
There can be a potential crash due to buffer overrun in 
SSL error handling code due to missing comma in
ssl_error_string[] array in viosslfactories.c.

ANALYSIS:
Found by code Inspection.

FIX:
Added the missing comma in SSL error handling code
in ssl_error_string[] array in viosslfactories.c.
2013-08-28 15:19:30 +05:30
Raghav Kapoor
881e61db72 BUG#17294150-POTENTIAL CRASH DUE TO BUFFER OVERRUN IN SSL
ERROR HANDLING CODE 

BACKGROUND:
There can be a potential crash due to buffer overrun in 
SSL error handling code due to missing comma in
ssl_error_string[] array in viosslfactories.c.

ANALYSIS:
Found by code Inspection.

FIX:
Added the missing comma in SSL error handling code
in ssl_error_string[] array in viosslfactories.c.
2013-08-28 15:17:46 +05:30
Raghav Kapoor
c53cad81f8 BUG#17294150-POTENTIAL CRASH DUE TO BUFFER OVERRUN IN SSL
ERROR HANDLING CODE 

BACKGROUND:
There can be a potential crash due to buffer overrun in 
SSL error handling code due to missing comma in
ssl_error_string[] array in viosslfactories.c.

ANALYSIS:
Found by code Inspection.

FIX:
Added the missing comma in SSL error handling code
in ssl_error_string[] array in viosslfactories.c.
2013-08-28 15:17:46 +05:30
Sergei Golubchik
e0a08c567a Compilation warnings.
openssl compilation problem.
2013-05-07 18:26:22 +02:00
Sergei Golubchik
b381cf843c mysql-5.5.31 merge 2013-05-07 13:05:09 +02:00
Murthy Narkedimilli
fe85f54640 Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
Murthy Narkedimilli
d20a70fb55 Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
Murthy Narkedimilli
053d7e775c Updated/added copyright headers. 2013-02-25 15:26:00 +01:00
Murthy Narkedimilli
69d8812a61 Updated/added copyright headers. 2013-02-25 15:26:00 +01:00
Harin Vadodaria
cc85d62c68 Bug#16235681: TURN OFF DEFAULT COMPRESSION WHILE USING
OPENSSL

Description: Merge from 5.1.
2013-02-19 12:19:10 +05:30
Harin Vadodaria
02c7c2a68c Bug#16235681: TURN OFF DEFAULT COMPRESSION WHILE USING
OPENSSL

Description: Merge from 5.1.
2013-02-19 12:19:10 +05:30
Harin Vadodaria
c401365423 Bug#16235681: TURN OFF DEFAULT COMPRESSION WHILE USING
OPENSSL

Description: Specify preference to disable compression
             while using OpenSSL library. OpenSSL uses
             zlib compression by default which may
             lead to some problems.
2013-02-19 12:17:31 +05:30
Harin Vadodaria
d1aeebd592 Bug#16235681: TURN OFF DEFAULT COMPRESSION WHILE USING
OPENSSL

Description: Specify preference to disable compression
             while using OpenSSL library. OpenSSL uses
             zlib compression by default which may
             lead to some problems.
2013-02-19 12:17:31 +05:30
Vladislav Vaintroub
77269f589e MDEV-3901: Wrong SSL error messages
Fixed typo (missing comma)
2012-12-01 16:33:22 +01:00
unknown
c5cef4b166 Merge MariaDB 5.1.66 -> 5.2.12 2012-11-08 15:24:35 +02:00
unknown
7c23d6d0c6 Merge MySQL 5.1.66 -> MariaDB 5.1.65 2012-11-06 11:52:55 +02:00
Sergei Golubchik
ee9afef271 mysql-5.5.28 2012-10-16 13:04:42 +02:00
Sergei Golubchik
1fd8150a5b 5.1 merge
increase xtradb verson from 13.0 to 13.01
2012-08-22 16:13:54 +02:00
Sergei Golubchik
cefc30b166 merge with MySQL 5.1.65 2012-08-22 11:40:39 +02:00
Venkata Sidagam
3f8a9984f6 Bug #13115401: -SSL-KEY VALUE IS NOT VALIDATED AND IT ALLOWS INSECURE
CONNECTIONS IF SPE

Merged from mysql-5.1 to mysql-5.5
2012-08-11 15:52:11 +05:30
Venkata Sidagam
cd5a42085f Bug #13115401: -SSL-KEY VALUE IS NOT VALIDATED AND IT ALLOWS INSECURE
CONNECTIONS IF SPE

Merged from mysql-5.1 to mysql-5.5
2012-08-11 15:52:11 +05:30
Venkata Sidagam
18087b049e Bug #13115401: -SSL-KEY VALUE IS NOT VALIDATED AND IT ALLOWS INSECURE
CONNECTIONS IF SPE

Problem description: -ssl-key value is not validated, you can assign any bogus 
text to --ssl-key and it is not verified that it exists, and more importantly, 
it allows the client to connect to mysqld.

Fix: Added proper validations checks for --ssl-key.

Note:
1) Documentation changes require for 5.1, 5.5, 5.6 and trunk in the sections
   listed below and the details are :

 http://dev.mysql.com/doc/refman/5.6/en/ssl-options.html#option_general_ssl
    and
 REQUIRE SSL section of
 http://dev.mysql.com/doc/refman/5.6/en/grant.html

2) Client having with option '--ssl', should able to get ssl connection. This 
will be implemented as part of separate fix in 5.6 and trunk.
2012-08-11 15:43:04 +05:30
Venkata Sidagam
40319e9b44 Bug #13115401: -SSL-KEY VALUE IS NOT VALIDATED AND IT ALLOWS INSECURE
CONNECTIONS IF SPE

Problem description: -ssl-key value is not validated, you can assign any bogus 
text to --ssl-key and it is not verified that it exists, and more importantly, 
it allows the client to connect to mysqld.

Fix: Added proper validations checks for --ssl-key.

Note:
1) Documentation changes require for 5.1, 5.5, 5.6 and trunk in the sections
   listed below and the details are :

 http://dev.mysql.com/doc/refman/5.6/en/ssl-options.html#option_general_ssl
    and
 REQUIRE SSL section of
 http://dev.mysql.com/doc/refman/5.6/en/grant.html

2) Client having with option '--ssl', should able to get ssl connection. This 
will be implemented as part of separate fix in 5.6 and trunk.
2012-08-11 15:43:04 +05:30