Skip to content

Commit c28e258

Browse files
Robert GolebiowskiHery Ramilison
authored andcommitted
Merge branch 'mysql-5.6' into mysql-5.7
(cherry picked from commit 710bafee9de1c11577242d694f74f5fa38df3a88)
1 parent 103c622 commit c28e258

File tree

9 files changed

+219
-106
lines changed

9 files changed

+219
-106
lines changed

extra/yassl/README

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

1313
*** end Note ***
1414

15+
yaSSL Release notes, version 2.4.2 (9/22/2016)
16+
This release of yaSSL fixes a medium security vulnerability. A fix for
17+
potential AES side channel leaks is included that a local user monitoring
18+
the same CPU core cache could exploit. VM users, hyper-threading users,
19+
and users where potential attackers have access to the CPU cache will need
20+
to update if they utilize AES.
21+
22+
DSA padding fixes for unusual sizes is included as well. Users with DSA
23+
certficiates should update.
24+
1525
yaSSL Release notes, version 2.4.0 (5/20/2016)
1626
This release of yaSSL fixes the OpenSSL compatibility function
1727
SSL_CTX_load_verify_locations() when using the path directory to allow

extra/yassl/certs/dsa-cert.pem

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
-----BEGIN CERTIFICATE-----
2-
MIIDqzCCA2ugAwIBAgIJAMGqrgDU6DyhMAkGByqGSM44BAMwgY4xCzAJBgNVBAYT
2+
MIIDrzCCA2+gAwIBAgIJAK1zRM7YFcNjMAkGByqGSM44BAMwgZAxCzAJBgNVBAYT
33
AlVTMQ8wDQYDVQQIDAZPcmVnb24xETAPBgNVBAcMCFBvcnRsYW5kMRAwDgYDVQQK
4-
DAd3b2xmU1NMMRAwDgYDVQQLDAd0ZXN0aW5nMRYwFAYDVQQDDA13d3cueWFzc2wu
5-
Y29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tMB4XDTEzMDQyMjIw
6-
MDk0NFoXDTE2MDExNzIwMDk0NFowgY4xCzAJBgNVBAYTAlVTMQ8wDQYDVQQIDAZP
7-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jgEAwMvADAsAhQRYSCVN/Ge
21+
agV3mffU3qNZ92fI0QIUPH7Jp+iASI7U1ocaYDc10qXGaGY=
2222
-----END CERTIFICATE-----

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.4.0"
37+
#define YASSL_VERSION "2.4.2"
3838

3939

4040
#if defined(__cplusplus)

extra/yassl/src/ssl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
161161
TaoCrypt::DSA_PrivateKey dsaKey;
162162
dsaKey.Initialize(dsaSource);
163163

164-
if (rsaSource.GetError().What()) {
164+
if (dsaSource.GetError().What()) {
165165
// neither worked
166166
ret = SSL_FAILURE;
167167
}

extra/yassl/taocrypt/include/aes.hpp

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class AES : public Mode_BASE {
6060

6161
static const word32 Te[5][256];
6262
static const word32 Td[5][256];
63+
static const byte CTd4[256];
6364

6465
static const word32* Te0;
6566
static const word32* Te1;
@@ -80,11 +81,68 @@ class AES : public Mode_BASE {
8081

8182
void ProcessAndXorBlock(const byte*, const byte*, byte*) const;
8283

84+
word32 PreFetchTe() const;
85+
word32 PreFetchTd() const;
86+
word32 PreFetchCTd4() const;
87+
8388
AES(const AES&); // hide copy
8489
AES& operator=(const AES&); // and assign
8590
};
8691

8792

93+
#if defined(__x86_64__) || defined(_M_X64) || \
94+
(defined(__ILP32__) && (__ILP32__ >= 1))
95+
#define TC_CACHE_LINE_SZ 64
96+
#else
97+
/* default cache line size */
98+
#define TC_CACHE_LINE_SZ 32
99+
#endif
100+
101+
inline word32 AES::PreFetchTe() const
102+
{
103+
word32 x = 0;
104+
105+
/* 4 tables of 256 entries */
106+
for (int i = 0; i < 4; i++) {
107+
/* each entry is 4 bytes */
108+
for (int j = 0; j < 256; j += TC_CACHE_LINE_SZ/4) {
109+
x &= Te[i][j];
110+
}
111+
}
112+
113+
return x;
114+
}
115+
116+
117+
inline word32 AES::PreFetchTd() const
118+
{
119+
word32 x = 0;
120+
121+
/* 4 tables of 256 entries */
122+
for (int i = 0; i < 4; i++) {
123+
/* each entry is 4 bytes */
124+
for (int j = 0; j < 256; j += TC_CACHE_LINE_SZ/4) {
125+
x &= Td[i][j];
126+
}
127+
}
128+
129+
return x;
130+
}
131+
132+
133+
inline word32 AES::PreFetchCTd4() const
134+
{
135+
word32 x = 0;
136+
int i;
137+
138+
for (i = 0; i < 256; i += TC_CACHE_LINE_SZ) {
139+
x &= CTd4[i];
140+
}
141+
142+
return x;
143+
}
144+
145+
88146
typedef BlockCipher<ENCRYPTION, AES, ECB> AES_ECB_Encryption;
89147
typedef BlockCipher<DECRYPTION, AES, ECB> AES_ECB_Decryption;
90148

0 commit comments

Comments
 (0)