Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f61a9806
Commit
f61a9806
authored
Jul 26, 2019
by
Vladislav Vaintroub
Committed by
Oleksandr Byelkin
Jul 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update WolfSSL, remove older workarounds.
parent
2792c6e7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
52 deletions
+8
-52
extra/wolfssl/CMakeLists.txt
extra/wolfssl/CMakeLists.txt
+0
-4
extra/wolfssl/wolfssl
extra/wolfssl/wolfssl
+1
-1
mysys_ssl/my_crypt.cc
mysys_ssl/my_crypt.cc
+0
-16
storage/innobase/log/log0crypt.cc
storage/innobase/log/log0crypt.cc
+0
-6
storage/innobase/row/row0log.cc
storage/innobase/row/row0log.cc
+5
-15
storage/innobase/row/row0merge.cc
storage/innobase/row/row0merge.cc
+2
-10
No files found.
extra/wolfssl/CMakeLists.txt
View file @
f61a9806
...
...
@@ -40,10 +40,6 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl)
IF
(
MSVC
)
# size_t to long truncation warning
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-wd4267 -wd4334"
)
IF
(
CMAKE_C_COMPILER_ID MATCHES Clang
)
# Workaround a bug with clang-cl, see https://github.com/wolfSSL/wolfssl/pull/2090
ADD_DEFINITIONS
(
-DMP_16BIT
)
ENDIF
()
ENDIF
()
ADD_CONVENIENCE_LIBRARY
(
wolfssl
${
WOLFSSL_SOURCES
}
)
...
...
wolfssl
@
50fbdb96
Subproject commit
21f2beca9f320199fcea4a96df3e19967804144b
Subproject commit
50fbdb961fd8c2d8123064e567ae8ec44167732d
mysys_ssl/my_crypt.cc
View file @
f61a9806
...
...
@@ -88,24 +88,8 @@ class MyCTX
}
virtual
int
finish
(
uchar
*
dst
,
uint
*
dlen
)
{
#ifdef HAVE_WOLFSSL
/*
Bug in WolfSSL - sometimes EVP_CipherFinal_ex
returns success without setting destination length
when it should return error.
We catch it by presetting invalid value for length,
and checking if it has changed after the call.
See https://github.com/wolfSSL/wolfssl/issues/2224
*/
*
dlen
=
UINT_MAX
;
#endif
if
(
EVP_CipherFinal_ex
(
ctx
,
dst
,
(
int
*
)
dlen
)
!=
1
)
return
MY_AES_BAD_DATA
;
#ifdef HAVE_WOLFSSL
if
(
*
dlen
==
UINT_MAX
)
return
MY_AES_BAD_DATA
;
#endif
return
MY_AES_OK
;
}
};
...
...
storage/innobase/log/log0crypt.cc
View file @
f61a9806
...
...
@@ -41,12 +41,6 @@ my_bool srv_encrypt_log;
struct
aes_block_t
{
byte
bytes
[
MY_AES_BLOCK_SIZE
];
#ifdef HAVE_WOLFSSL
// Workaround for MDEV-19582.
// WolfSSL reads memory out of bounds with decrypt/NOPAD
// Pad the structure to workaround
byte
pad
[
MY_AES_BLOCK_SIZE
];
#endif
};
struct
crypt_info_t
{
...
...
storage/innobase/row/row0log.cc
View file @
f61a9806
...
...
@@ -42,14 +42,6 @@ Created 2011-05-26 Marko Makela
#include <algorithm>
#include <map>
#ifdef HAVE_WOLFSSL
// Workaround for MDEV-19582
// (WolfSSL reads memory out of bounds with decryption/NOPAD)
#define WOLFSSL_PAD_SIZE MY_AES_BLOCK_SIZE
#else
#define WOLFSSL_PAD_SIZE 0
#endif
Atomic_counter
<
ulint
>
onlineddl_rowlog_rows
;
ulint
onlineddl_rowlog_pct_used
;
ulint
onlineddl_pct_progress
;
...
...
@@ -301,7 +293,7 @@ row_log_block_allocate(
);
log_buf
.
block
=
ut_allocator
<
byte
>
(
mem_key_row_log_buf
)
.
allocate_large
(
srv_sort_buf_size
+
WOLFSSL_PAD_SIZE
,
.
allocate_large
(
srv_sort_buf_size
,
&
log_buf
.
block_pfx
);
if
(
log_buf
.
block
==
NULL
)
{
...
...
@@ -323,7 +315,7 @@ row_log_block_free(
if
(
log_buf
.
block
!=
NULL
)
{
ut_allocator
<
byte
>
(
mem_key_row_log_buf
).
deallocate_large
(
log_buf
.
block
,
&
log_buf
.
block_pfx
,
log_buf
.
size
+
WOLFSSL_PAD_SIZE
);
log_buf
.
size
);
log_buf
.
block
=
NULL
;
}
DBUG_VOID_RETURN
;
...
...
@@ -3239,7 +3231,7 @@ row_log_allocate(
index
->
online_log
=
log
;
if
(
log_tmp_is_encrypted
())
{
ulint
size
=
srv_sort_buf_size
+
WOLFSSL_PAD_SIZE
;
ulint
size
=
srv_sort_buf_size
;
log
->
crypt_head
=
static_cast
<
byte
*>
(
os_mem_alloc_large
(
&
size
));
log
->
crypt_tail
=
static_cast
<
byte
*>
(
os_mem_alloc_large
(
&
size
));
...
...
@@ -3273,13 +3265,11 @@ row_log_free(
row_merge_file_destroy_low
(
log
->
fd
);
if
(
log
->
crypt_head
)
{
os_mem_free_large
(
log
->
crypt_head
,
srv_sort_buf_size
+
WOLFSSL_PAD_SIZE
);
os_mem_free_large
(
log
->
crypt_head
,
srv_sort_buf_size
);
}
if
(
log
->
crypt_tail
)
{
os_mem_free_large
(
log
->
crypt_tail
,
srv_sort_buf_size
+
WOLFSSL_PAD_SIZE
);
os_mem_free_large
(
log
->
crypt_tail
,
srv_sort_buf_size
);
}
mutex_free
(
&
log
->
mutex
);
...
...
storage/innobase/row/row0merge.cc
View file @
f61a9806
...
...
@@ -54,14 +54,6 @@ Completed by Sunny Bains and Marko Makela
# define posix_fadvise(fd, offset, len, advice)
/* nothing */
#endif
/* _WIN32 */
#ifdef HAVE_WOLFSSL
// Workaround for MDEV-19582
// (WolfSSL accesses memory out of bounds)
# define WOLFSSL_PAD_SIZE MY_AES_BLOCK_SIZE
#else
# define WOLFSSL_PAD_SIZE 0
#endif
/* Whether to disable file system cache */
char
srv_disable_sort_file_cache
;
...
...
@@ -4627,7 +4619,7 @@ row_merge_build_indexes(
if
(
log_tmp_is_encrypted
())
{
crypt_block
=
static_cast
<
row_merge_block_t
*>
(
alloc
.
allocate_large
(
block_size
+
WOLFSSL_PAD_SIZE
,
alloc
.
allocate_large
(
block_size
,
&
crypt_pfx
));
if
(
crypt_block
==
NULL
)
{
...
...
@@ -4999,7 +4991,7 @@ row_merge_build_indexes(
if
(
crypt_block
)
{
alloc
.
deallocate_large
(
crypt_block
,
&
crypt_pfx
,
block_size
+
WOLFSSL_PAD_SIZE
);
block_size
);
}
DICT_TF2_FLAG_UNSET
(
new_table
,
DICT_TF2_FTS_ADD_DOC_ID
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment