diff options
author | Michael Mair-Keimberger <mmk@levelnine.at> | 2021-08-20 20:27:09 +0200 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2021-08-28 01:38:49 +0200 |
commit | 19e6c92263dda4f0892354b05d58a064cd0db7f6 (patch) | |
tree | 623d3584802f6a86d950a25e5e192a7118ac8585 /dev-db | |
parent | app-crypt/xca: remove unused patch (diff) | |
download | gentoo-19e6c92263dda4f0892354b05d58a064cd0db7f6.tar.gz gentoo-19e6c92263dda4f0892354b05d58a064cd0db7f6.tar.bz2 gentoo-19e6c92263dda4f0892354b05d58a064cd0db7f6.zip |
dev-db/mariadb: remove unused patches
Closes: https://github.com/gentoo/gentoo/pull/22057
Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at>
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/mariadb/files/mariadb-10.3-CVE-2020-15180.patch | 75 | ||||
-rw-r--r-- | dev-db/mariadb/files/mariadb-10.4-CVE-2020-15180.patch | 62 |
2 files changed, 0 insertions, 137 deletions
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 deleted file mode 100644 index 85d378f8232c..000000000000 --- a/dev-db/mariadb/files/mariadb-10.3-CVE-2020-15180.patch +++ /dev/null @@ -1,75 +0,0 @@ -https://github.com/MariaDB/server/commit/418850b2df4256da5a722288c2657650dc228842 - ---- a/sql/wsrep_sst.cc -+++ b/sql/wsrep_sst.cc -@@ -1726,24 +1726,65 @@ static int sst_donate_other (const char* method, - return arg.err; - } - -+/* return true if character can be a part of a filename */ -+static bool filename_char(int const c) -+{ -+ return isalnum(c) || (c == '-') || (c == '_') || (c == '.'); -+} -+ -+/* return true if character can be a part of an address string */ -+static bool address_char(int const c) -+{ -+ return filename_char(c) || -+ (c == ':') || (c == '[') || (c == ']') || (c == '/'); -+} -+ -+static bool check_request_str(const char* const str, -+ bool (*check) (int c)) -+{ -+ for (size_t i(0); str[i] != '\0'; ++i) -+ { -+ if (!check(str[i])) -+ { -+ WSREP_WARN("Illegal character in state transfer request: %i (%c).", -+ str[i], str[i]); -+ return true; -+ } -+ } -+ -+ return false; -+} -+ - wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx, - const void* msg, size_t msg_len, - const wsrep_gtid_t* current_gtid, - const char* state, size_t state_len, - bool bypass) - { -- /* This will be reset when sync callback is called. -- * Should we set wsrep_ready to FALSE here too? */ -- -- wsrep_config_state->set(WSREP_MEMBER_DONOR); -- - const char* method = (char*)msg; - size_t method_len = strlen (method); -+ -+ if (check_request_str(method, filename_char)) -+ { -+ WSREP_ERROR("Bad SST method name. SST canceled."); -+ return WSREP_CB_FAILURE; -+ } -+ - const char* data = method + method_len + 1; - -+ if (check_request_str(data, address_char)) -+ { -+ WSREP_ERROR("Bad SST address string. SST canceled."); -+ return WSREP_CB_FAILURE; -+ } -+ - char uuid_str[37]; - wsrep_uuid_print (¤t_gtid->uuid, uuid_str, sizeof(uuid_str)); - -+ /* This will be reset when sync callback is called. -+ * Should we set wsrep_ready to FALSE here too? */ -+ wsrep_config_state->set(WSREP_MEMBER_DONOR); -+ - wsp::env env(NULL); - if (env.error()) - { 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 deleted file mode 100644 index 9658669c6e61..000000000000 --- a/dev-db/mariadb/files/mariadb-10.4-CVE-2020-15180.patch +++ /dev/null @@ -1,62 +0,0 @@ -https://github.com/MariaDB/server/commit/418850b2df4256da5a722288c2657650dc228842 - ---- a/sql/wsrep_sst.cc -+++ b/sql/wsrep_sst.cc -@@ -1822,6 +1822,35 @@ static int sst_donate_other (const char* method, - return arg.err; - } - -+/* return true if character can be a part of a filename */ -+static bool filename_char(int const c) -+{ -+ return isalnum(c) || (c == '-') || (c == '_') || (c == '.'); -+} -+ -+/* return true if character can be a part of an address string */ -+static bool address_char(int const c) -+{ -+ return filename_char(c) || -+ (c == ':') || (c == '[') || (c == ']') || (c == '/'); -+} -+ -+static bool check_request_str(const char* const str, -+ bool (*check) (int c)) -+{ -+ for (size_t i(0); str[i] != '\0'; ++i) -+ { -+ if (!check(str[i])) -+ { -+ WSREP_WARN("Illegal character in state transfer request: %i (%c).", -+ str[i], str[i]); -+ return true; -+ } -+ } -+ -+ return false; -+} -+ - int wsrep_sst_donate(const std::string& msg, - const wsrep::gtid& current_gtid, - const bool bypass) -@@ -1833,8 +1862,21 @@ int wsrep_sst_donate(const std::string& msg, - - const char* method= msg.data(); - size_t method_len= strlen (method); -+ -+ if (check_request_str(method, filename_char)) -+ { -+ WSREP_ERROR("Bad SST method name. SST canceled."); -+ return WSREP_CB_FAILURE; -+ } -+ - const char* data= method + method_len + 1; - -+ if (check_request_str(data, address_char)) -+ { -+ WSREP_ERROR("Bad SST address string. SST canceled."); -+ return WSREP_CB_FAILURE; -+ } -+ - wsp::env env(NULL); - if (env.error()) - { |