diff options
author | Mingli Yu <mingli.yu@windriver.com> | 2021-01-26 17:21:06 +0800 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2021-02-09 08:52:16 -0800 |
commit | 3ebf00ee3afeff4672a3c67820f0befbe23f09c1 (patch) | |
tree | 711b5aa496184cdb9294e777f5e0bfdf2b8270e4 | |
parent | e892991f8d53fe7844607d29b35ecf5bf89d8987 (diff) | |
download | meta-openembedded-3ebf00ee3afeff4672a3c67820f0befbe23f09c1.tar.gz |
mariadb: upgrade to 10.5.8
Fixes for the following security vulnerabilities:
CVE-2020-14812
CVE-2020-14765
CVE-2020-14776
CVE-2020-14789
CVE-2020-28912 (MDEV-24040)
Rebase c11_atomics.patch to avoid fuzz warnings and add
a patch to fix below build error on musl.
/prj/tmp/work/cortexa57-poky-linux-musl/mariadb/10.5.8-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux-musl/../../libexec/aarch64-poky-linux-musl/gcc/aarch64-poky-linux-musl/10.2.0/ld.bfd: /usr/src/debug/mariadb/10.5.8-r0/mariadb-10.5.8/unittest/mysys/stacktrace-t.c:36: undefined reference to `my_safe_print_str'
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 486d0fa33ec6dc41f198445180135ccccb897ce1)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb-native_10.5.8.bb (renamed from meta-oe/recipes-dbs/mysql/mariadb-native_10.5.6.bb) | 0 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb.inc | 3 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb/0001-stacktrace-t.c-make-the-test-conditional.patch | 38 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch | 14 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb_10.5.8.bb (renamed from meta-oe/recipes-dbs/mysql/mariadb_10.5.6.bb) | 0 |
5 files changed, 47 insertions, 8 deletions
diff --git a/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.6.bb b/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.8.bb index 73b2a0980..73b2a0980 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.6.bb +++ b/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.8.bb | |||
diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc index f6c32270b..27eede6c3 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc | |||
@@ -20,8 +20,9 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz | |||
20 | file://fix-arm-atomic.patch \ | 20 | file://fix-arm-atomic.patch \ |
21 | file://0001-Fix-library-LZ4-lookup.patch \ | 21 | file://0001-Fix-library-LZ4-lookup.patch \ |
22 | file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \ | 22 | file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \ |
23 | file://0001-stacktrace-t.c-make-the-test-conditional.patch \ | ||
23 | " | 24 | " |
24 | SRC_URI[sha256sum] = "ff05dd69e9f6992caf1053242db704f04eda6f9accbcc98b74edfaf6013c45c4" | 25 | SRC_URI[sha256sum] = "eb4824f6f2c532cd3fc6a6bce7bf78ea7c6b949f8bdd07656b2c84344e757be8" |
25 | 26 | ||
26 | UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases" | 27 | UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases" |
27 | 28 | ||
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-stacktrace-t.c-make-the-test-conditional.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-stacktrace-t.c-make-the-test-conditional.patch new file mode 100644 index 000000000..d8f672d74 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-stacktrace-t.c-make-the-test-conditional.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 966cbeb309f867ff4ac8e7f4462be4780e421700 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <mingli.yu@windriver.com> | ||
3 | Date: Mon, 25 Jan 2021 19:01:06 -0800 | ||
4 | Subject: [PATCH] stacktrace-t.c: make the test conditional | ||
5 | |||
6 | Fixes: | ||
7 | /prj/tmp/work/cortexa57-poky-linux-musl/mariadb/10.5.8-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux-musl/../../libexec/aarch64-poky-linux-musl/gcc/aarch64-poky-linux-musl/10.2.0/ld.bfd: /usr/src/debug/mariadb/10.5.8-r0/mariadb-10.5.8/unittest/mysys/stacktrace-t.c:36: undefined reference to `my_safe_print_str' | ||
8 | |||
9 | Upstream-Status: Submitted [https://jira.mariadb.org/browse/MDEV-24131] | ||
10 | |||
11 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
12 | --- | ||
13 | unittest/mysys/stacktrace-t.c | 2 ++ | ||
14 | 1 file changed, 2 insertions(+) | ||
15 | |||
16 | diff --git a/unittest/mysys/stacktrace-t.c b/unittest/mysys/stacktrace-t.c | ||
17 | index 8fa0db15b36..d8408f80d76 100644 | ||
18 | --- a/unittest/mysys/stacktrace-t.c | ||
19 | +++ b/unittest/mysys/stacktrace-t.c | ||
20 | @@ -29,6 +29,7 @@ void test_my_safe_print_str() | ||
21 | memcpy(b_stack, "LEGAL", 6); | ||
22 | memcpy(b_bss, "LEGAL", 6); | ||
23 | |||
24 | +#ifdef HAVE_STACKTRACE | ||
25 | #ifndef __SANITIZE_ADDRESS__ | ||
26 | fprintf(stderr, "\n===== stack =====\n"); | ||
27 | my_safe_print_str(b_stack, 65535); | ||
28 | @@ -48,6 +49,7 @@ void test_my_safe_print_str() | ||
29 | fprintf(stderr, "\n===== (const char*) 1 =====\n"); | ||
30 | my_safe_print_str((const char*)1, 5); | ||
31 | #endif /*__SANITIZE_ADDRESS__*/ | ||
32 | +#endif /*HAVE_STACKTRACE*/ | ||
33 | |||
34 | free(b_heap); | ||
35 | |||
36 | -- | ||
37 | 2.17.1 | ||
38 | |||
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch b/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch index 36217f9aa..32c9818ab 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch | |||
@@ -17,10 +17,10 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | |||
17 | 3 files changed, 27 insertions(+), 1 deletion(-) | 17 | 3 files changed, 27 insertions(+), 1 deletion(-) |
18 | 18 | ||
19 | diff --git a/configure.cmake b/configure.cmake | 19 | diff --git a/configure.cmake b/configure.cmake |
20 | index a355214..6ee595f 100644 | 20 | index bb3ad43..2ff4f19 100644 |
21 | --- a/configure.cmake | 21 | --- a/configure.cmake |
22 | +++ b/configure.cmake | 22 | +++ b/configure.cmake |
23 | @@ -865,7 +865,25 @@ int main() | 23 | @@ -861,7 +861,25 @@ int main() |
24 | long long int *ptr= &var; | 24 | long long int *ptr= &var; |
25 | return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); | 25 | return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); |
26 | }" | 26 | }" |
@@ -48,11 +48,11 @@ index a355214..6ee595f 100644 | |||
48 | IF(WITH_VALGRIND) | 48 | IF(WITH_VALGRIND) |
49 | SET(HAVE_valgrind 1) | 49 | SET(HAVE_valgrind 1) |
50 | diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt | 50 | diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt |
51 | index 3d8a20e..42f1441 100644 | 51 | index 6a3a1ef..e306ae7 100644 |
52 | --- a/mysys/CMakeLists.txt | 52 | --- a/mysys/CMakeLists.txt |
53 | +++ b/mysys/CMakeLists.txt | 53 | +++ b/mysys/CMakeLists.txt |
54 | @@ -129,6 +129,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} | 54 | @@ -140,6 +140,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} |
55 | ${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO}) | 55 | ${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO}) |
56 | DTRACE_INSTRUMENT(mysys) | 56 | DTRACE_INSTRUMENT(mysys) |
57 | 57 | ||
58 | +IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) | 58 | +IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) |
@@ -63,10 +63,10 @@ index 3d8a20e..42f1441 100644 | |||
63 | TARGET_LINK_LIBRARIES(mysys bfd) | 63 | TARGET_LINK_LIBRARIES(mysys bfd) |
64 | ENDIF(HAVE_BFD_H) | 64 | ENDIF(HAVE_BFD_H) |
65 | diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt | 65 | diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt |
66 | index 616017b..53575f6 100644 | 66 | index 4978d01..883a930 100644 |
67 | --- a/sql/CMakeLists.txt | 67 | --- a/sql/CMakeLists.txt |
68 | +++ b/sql/CMakeLists.txt | 68 | +++ b/sql/CMakeLists.txt |
69 | @@ -219,6 +219,10 @@ ELSE() | 69 | @@ -220,6 +220,10 @@ ELSE() |
70 | SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL}) | 70 | SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL}) |
71 | ENDIF() | 71 | ENDIF() |
72 | 72 | ||
diff --git a/meta-oe/recipes-dbs/mysql/mariadb_10.5.6.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.5.8.bb index e6743fe97..e6743fe97 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb_10.5.6.bb +++ b/meta-oe/recipes-dbs/mysql/mariadb_10.5.8.bb | |||