Skip to content

Commit e19a6f3

Browse files
committed
Merge branch 'bb-10.1-serg' into 10.1
2 parents 0b4c3ad + dfb74de commit e19a6f3

File tree

244 files changed

+7246
-2756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

244 files changed

+7246
-2756
lines changed

client/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -51,6 +51,7 @@ MYSQL_ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c)
5151
TARGET_LINK_LIBRARIES(mysqldump mysqlclient)
5252

5353
MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c)
54+
SET_SOURCE_FILES_PROPERTIES(mysqlimport.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
5455
TARGET_LINK_LIBRARIES(mysqlimport mysqlclient)
5556

5657
MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c COMPONENT Server)

client/mysqlimport.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
2-
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
2+
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
3+
Copyright (c) 2011, 2015, MariaDB
34
45
This program is free software; you can redistribute it and/or modify
56
it under the terms of the GNU General Public License as published by
@@ -30,7 +31,6 @@
3031

3132
#include "client_priv.h"
3233
#include "mysql_version.h"
33-
#include <my_pthread.h>
3434

3535
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
3636

@@ -484,7 +484,6 @@ static void db_disconnect(char *host, MYSQL *mysql)
484484
}
485485

486486

487-
488487
static void safe_exit(int error, MYSQL *mysql)
489488
{
490489
if (error && ignore_errors)

cmake/os/Windows.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -49,10 +49,12 @@ IF(CMAKE_C_COMPILER MATCHES "icl")
4949
SET(MSVC TRUE)
5050
ENDIF()
5151

52-
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
53-
ADD_DEFINITIONS("-D_WIN32_WINNT=0x0501")
52+
ADD_DEFINITIONS(-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE)
53+
ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501)
54+
# We do not want the windows.h macros min/max
55+
ADD_DEFINITIONS(-DNOMINMAX)
5456
# Speed up build process excluding unused header files
55-
ADD_DEFINITIONS("-DWIN32_LEAN_AND_MEAN")
57+
ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN)
5658

5759
# Adjust compiler and linker flags
5860
IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)

extra/yassl/README

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,35 @@ before calling SSL_new();
1212

1313
*** end Note ***
1414

15+
yaSSL Release notes, version 2.3.8 (9/17/2015)
16+
This release of yaSSL fixes a high security vulnerability. All users
17+
SHOULD update. If using yaSSL for TLS on the server side with private
18+
RSA keys allowing ephemeral key exchange you MUST update and regenerate
19+
the RSA private keys. This report is detailed in:
20+
https://people.redhat.com/~fweimer/rsa-crt-leaks.pdf
21+
yaSSL now detects RSA signature faults and returns an error.
22+
23+
yaSSL Patch notes, version 2.3.7e (6/26/2015)
24+
This release of yaSSL includes a fix for Date less than comparison.
25+
Previously yaSSL would return true on less than comparisons if the Dates
26+
were equal. Reported by Oracle. No security problem, but if a cert was
27+
generated right now, a server started using it in the same second, and a
28+
client tried to verify it in the same second it would report not yet valid.
29+
30+
yaSSL Patch notes, version 2.3.7d (6/22/2015)
31+
This release of yaSSL includes a fix for input_buffer set_current with
32+
index 0. SSL_peek() at front of waiting data could trigger. Robert
33+
Golebiowski of Oracle identified and suggested a fix, thanks!
34+
35+
yaSSL Patch notes, version 2.3.7c (6/12/2015)
36+
This release of yaSSL does certificate DATE comparisons to the second
37+
instead of to the minute, helpful when using freshly generated certs.
38+
Though keep in mind that time sync differences could still show up.
39+
40+
yaSSL Patch notes, version 2.3.7b (3/18/2015)
41+
This release of yaSSL fixes a potential crash with corrupted private keys.
42+
Also detects bad keys earlier for user.
43+
1544
yaSSL Release notes, version 2.3.7 (12/10/2014)
1645
This release of yaSSL fixes the potential to process duplicate handshake
1746
messages by explicitly marking/checking received handshake messages.

extra/yassl/include/openssl/ssl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include "rsa.h"
3535

3636

37-
#define YASSL_VERSION "2.3.7"
37+
#define YASSL_VERSION "2.3.8"
3838

3939

4040
#if defined(__cplusplus)

extra/yassl/include/yassl_error.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ enum YasslError {
5353
compress_error = 118,
5454
decompress_error = 119,
5555
pms_version_error = 120,
56-
sanityCipher_error = 121
56+
sanityCipher_error = 121,
57+
rsaSignFault_error = 122
5758

5859
// !!!! add error message to .cpp !!!!
5960

extra/yassl/src/buffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void input_buffer::set_error()
165165

166166
void input_buffer::set_current(uint i)
167167
{
168-
if (error_ == 0 && (i == 0 || check(i - 1, size_) == 0))
168+
if (error_ == 0 && check(i ? i - 1 : 0, size_) == 0)
169169
current_ = i;
170170
else
171171
error_ = -1;

extra/yassl/src/handshake.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,8 @@ void sendCertificateVerify(SSL& ssl, BufferOutput buffer)
11731173

11741174
CertificateVerify verify;
11751175
verify.Build(ssl);
1176+
if (ssl.GetError()) return;
1177+
11761178
RecordLayerHeader rlHeader;
11771179
HandShakeHeader hsHeader;
11781180
mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);

extra/yassl/src/ssl.cpp

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
#include "file.hpp" // for TaoCrypt Source
3838
#include "coding.hpp" // HexDecoder
3939
#include "helpers.hpp" // for placement new hack
40+
#include "rsa.hpp" // for TaoCrypt RSA key decode
41+
#include "dsa.hpp" // for TaoCrypt DSA key decode
4042
#include <stdio.h>
4143
#include <time.h>
4244

@@ -55,6 +57,8 @@ namespace yaSSL {
5557

5658
int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
5759
{
60+
int ret = SSL_SUCCESS;
61+
5862
if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM)
5963
return SSL_BAD_FILETYPE;
6064

@@ -142,8 +146,31 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
142146
}
143147
}
144148
}
149+
150+
if (type == PrivateKey && ctx->privateKey_) {
151+
// see if key is valid early
152+
TaoCrypt::Source rsaSource(ctx->privateKey_->get_buffer(),
153+
ctx->privateKey_->get_length());
154+
TaoCrypt::RSA_PrivateKey rsaKey;
155+
rsaKey.Initialize(rsaSource);
156+
157+
if (rsaSource.GetError().What()) {
158+
// rsa failed see if DSA works
159+
160+
TaoCrypt::Source dsaSource(ctx->privateKey_->get_buffer(),
161+
ctx->privateKey_->get_length());
162+
TaoCrypt::DSA_PrivateKey dsaKey;
163+
dsaKey.Initialize(dsaSource);
164+
165+
if (rsaSource.GetError().What()) {
166+
// neither worked
167+
ret = SSL_FAILURE;
168+
}
169+
}
170+
}
171+
145172
fclose(input);
146-
return SSL_SUCCESS;
173+
return ret;
147174
}
148175

149176

extra/yassl/src/yassl_error.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ void SetErrorString(YasslError error, char* buffer)
148148
strncpy(buffer, "sanity check on cipher text size error", max);
149149
break;
150150

151+
case rsaSignFault_error:
152+
strncpy(buffer, "rsa signature fault error", max);
153+
break;
154+
151155
// openssl errors
152156
case SSL_ERROR_WANT_READ :
153157
strncpy(buffer, "the read operation would block", max);

0 commit comments

Comments
 (0)