Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mariadb/files/
Date: Fri, 27 Aug 2021 23:40:45
Message-Id: 1630107529.19e6c92263dda4f0892354b05d58a064cd0db7f6.conikost@gentoo
1 commit: 19e6c92263dda4f0892354b05d58a064cd0db7f6
2 Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
3 AuthorDate: Fri Aug 20 18:27:09 2021 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 27 23:38:49 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19e6c922
7
8 dev-db/mariadb: remove unused patches
9
10 Closes: https://github.com/gentoo/gentoo/pull/22057
11 Package-Manager: Portage-3.0.22, Repoman-3.0.3
12 Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
13 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
14
15 .../files/mariadb-10.3-CVE-2020-15180.patch | 75 ----------------------
16 .../files/mariadb-10.4-CVE-2020-15180.patch | 62 ------------------
17 2 files changed, 137 deletions(-)
18
19 diff --git a/dev-db/mariadb/files/mariadb-10.3-CVE-2020-15180.patch b/dev-db/mariadb/files/mariadb-10.3-CVE-2020-15180.patch
20 deleted file mode 100644
21 index 85d378f8232..00000000000
22 --- a/dev-db/mariadb/files/mariadb-10.3-CVE-2020-15180.patch
23 +++ /dev/null
24 @@ -1,75 +0,0 @@
25 -https://github.com/MariaDB/server/commit/418850b2df4256da5a722288c2657650dc228842
26 -
27 ---- a/sql/wsrep_sst.cc
28 -+++ b/sql/wsrep_sst.cc
29 -@@ -1726,24 +1726,65 @@ static int sst_donate_other (const char* method,
30 - return arg.err;
31 - }
32 -
33 -+/* return true if character can be a part of a filename */
34 -+static bool filename_char(int const c)
35 -+{
36 -+ return isalnum(c) || (c == '-') || (c == '_') || (c == '.');
37 -+}
38 -+
39 -+/* return true if character can be a part of an address string */
40 -+static bool address_char(int const c)
41 -+{
42 -+ return filename_char(c) ||
43 -+ (c == ':') || (c == '[') || (c == ']') || (c == '/');
44 -+}
45 -+
46 -+static bool check_request_str(const char* const str,
47 -+ bool (*check) (int c))
48 -+{
49 -+ for (size_t i(0); str[i] != '\0'; ++i)
50 -+ {
51 -+ if (!check(str[i]))
52 -+ {
53 -+ WSREP_WARN("Illegal character in state transfer request: %i (%c).",
54 -+ str[i], str[i]);
55 -+ return true;
56 -+ }
57 -+ }
58 -+
59 -+ return false;
60 -+}
61 -+
62 - wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx,
63 - const void* msg, size_t msg_len,
64 - const wsrep_gtid_t* current_gtid,
65 - const char* state, size_t state_len,
66 - bool bypass)
67 - {
68 -- /* This will be reset when sync callback is called.
69 -- * Should we set wsrep_ready to FALSE here too? */
70 --
71 -- wsrep_config_state->set(WSREP_MEMBER_DONOR);
72 --
73 - const char* method = (char*)msg;
74 - size_t method_len = strlen (method);
75 -+
76 -+ if (check_request_str(method, filename_char))
77 -+ {
78 -+ WSREP_ERROR("Bad SST method name. SST canceled.");
79 -+ return WSREP_CB_FAILURE;
80 -+ }
81 -+
82 - const char* data = method + method_len + 1;
83 -
84 -+ if (check_request_str(data, address_char))
85 -+ {
86 -+ WSREP_ERROR("Bad SST address string. SST canceled.");
87 -+ return WSREP_CB_FAILURE;
88 -+ }
89 -+
90 - char uuid_str[37];
91 - wsrep_uuid_print (&current_gtid->uuid, uuid_str, sizeof(uuid_str));
92 -
93 -+ /* This will be reset when sync callback is called.
94 -+ * Should we set wsrep_ready to FALSE here too? */
95 -+ wsrep_config_state->set(WSREP_MEMBER_DONOR);
96 -+
97 - wsp::env env(NULL);
98 - if (env.error())
99 - {
100
101 diff --git a/dev-db/mariadb/files/mariadb-10.4-CVE-2020-15180.patch b/dev-db/mariadb/files/mariadb-10.4-CVE-2020-15180.patch
102 deleted file mode 100644
103 index 9658669c6e6..00000000000
104 --- a/dev-db/mariadb/files/mariadb-10.4-CVE-2020-15180.patch
105 +++ /dev/null
106 @@ -1,62 +0,0 @@
107 -https://github.com/MariaDB/server/commit/418850b2df4256da5a722288c2657650dc228842
108 -
109 ---- a/sql/wsrep_sst.cc
110 -+++ b/sql/wsrep_sst.cc
111 -@@ -1822,6 +1822,35 @@ static int sst_donate_other (const char* method,
112 - return arg.err;
113 - }
114 -
115 -+/* return true if character can be a part of a filename */
116 -+static bool filename_char(int const c)
117 -+{
118 -+ return isalnum(c) || (c == '-') || (c == '_') || (c == '.');
119 -+}
120 -+
121 -+/* return true if character can be a part of an address string */
122 -+static bool address_char(int const c)
123 -+{
124 -+ return filename_char(c) ||
125 -+ (c == ':') || (c == '[') || (c == ']') || (c == '/');
126 -+}
127 -+
128 -+static bool check_request_str(const char* const str,
129 -+ bool (*check) (int c))
130 -+{
131 -+ for (size_t i(0); str[i] != '\0'; ++i)
132 -+ {
133 -+ if (!check(str[i]))
134 -+ {
135 -+ WSREP_WARN("Illegal character in state transfer request: %i (%c).",
136 -+ str[i], str[i]);
137 -+ return true;
138 -+ }
139 -+ }
140 -+
141 -+ return false;
142 -+}
143 -+
144 - int wsrep_sst_donate(const std::string& msg,
145 - const wsrep::gtid& current_gtid,
146 - const bool bypass)
147 -@@ -1833,8 +1862,21 @@ int wsrep_sst_donate(const std::string& msg,
148 -
149 - const char* method= msg.data();
150 - size_t method_len= strlen (method);
151 -+
152 -+ if (check_request_str(method, filename_char))
153 -+ {
154 -+ WSREP_ERROR("Bad SST method name. SST canceled.");
155 -+ return WSREP_CB_FAILURE;
156 -+ }
157 -+
158 - const char* data= method + method_len + 1;
159 -
160 -+ if (check_request_str(data, address_char))
161 -+ {
162 -+ WSREP_ERROR("Bad SST address string. SST canceled.");
163 -+ return WSREP_CB_FAILURE;
164 -+ }
165 -+
166 - wsp::env env(NULL);
167 - if (env.error())
168 - {