From 7e4bd513e73f13484074d4483836923c4939ccb7 Mon Sep 17 00:00:00 2001 From: Klaus Wenninger Date: Wed, 8 Jun 2022 17:17:57 +0200 Subject: [PATCH] * Wed Jun 8 2022 Klaus Wenninger - 2.1.4-0.1.rc1 - Update for new upstream tarball for release candidate: Pacemaker-2.1.4-rc1, for full details, see included ChangeLog file or https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.4-rc1 --- ...et-target-by-attribute-working-again.patch | 30 ------ ...-use-after-free-with-self-fencing-an.patch | 94 ------------------- pacemaker.spec | 13 ++- sources | 3 +- 4 files changed, 9 insertions(+), 131 deletions(-) delete mode 100644 0001-Fix-fencer-get-target-by-attribute-working-again.patch delete mode 100644 0002-Fix-fencer-avoid-use-after-free-with-self-fencing-an.patch diff --git a/0001-Fix-fencer-get-target-by-attribute-working-again.patch b/0001-Fix-fencer-get-target-by-attribute-working-again.patch deleted file mode 100644 index efd8292..0000000 --- a/0001-Fix-fencer-get-target-by-attribute-working-again.patch +++ /dev/null @@ -1,30 +0,0 @@ -From d4bd89fc5ad9eca7949f590843e9557a4b49e906 Mon Sep 17 00:00:00 2001 -From: Ken Gaillot -Date: Fri, 3 Jun 2022 08:51:08 -0500 -Subject: [PATCH] Fix: fencer: get target-by-attribute working again - -Regression in 2.1.3 introduced by b09f16eb1 - -This was papered over by the separate regression in cts-lab introduced by -4a6d1879, which caused target-by-attribute to no longer be tested, and which -was recently fixed by caf9a3bc. ---- - daemons/fenced/fenced_commands.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/daemons/fenced/fenced_commands.c b/daemons/fenced/fenced_commands.c -index aa070dd..a43a88f 100644 ---- a/daemons/fenced/fenced_commands.c -+++ b/daemons/fenced/fenced_commands.c -@@ -1549,7 +1549,7 @@ unpack_level_kind(xmlNode *level) - } - if (!stand_alone /* if standalone, there's no attribute manager */ - && (crm_element_value(level, XML_ATTR_STONITH_TARGET_ATTRIBUTE) != NULL) -- && (crm_element_value(level, XML_ATTR_STONITH_TARGET_VALUE) == NULL)) { -+ && (crm_element_value(level, XML_ATTR_STONITH_TARGET_VALUE) != NULL)) { - return fenced_target_by_attribute; - } - return fenced_target_by_unknown; --- -1.8.3.1 - diff --git a/0002-Fix-fencer-avoid-use-after-free-with-self-fencing-an.patch b/0002-Fix-fencer-avoid-use-after-free-with-self-fencing-an.patch deleted file mode 100644 index 68f6268..0000000 --- a/0002-Fix-fencer-avoid-use-after-free-with-self-fencing-an.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 1ab6a17d1272968a2d465acbf1e62af35344ce32 Mon Sep 17 00:00:00 2001 -From: Ken Gaillot -Date: Fri, 3 Jun 2022 11:19:04 -0500 -Subject: [PATCH] Fix: fencer: avoid use-after-free with self-fencing and - topology - -In the case of self-fencing with topology, handle_fence_request() will -overwrite F_STONITH_OPERATION in the original request XML, which invalidates -the request.op pointer created by stonith_command(). The fix is to make -request.op a copy. - -Regression introduced in 2.1.3 by 067d655eb ---- - daemons/fenced/fenced_commands.c | 4 ++-- - include/crm/common/messages_internal.h | 8 ++++++-- - lib/common/messages.c | 15 +++++++++++++++ - 3 files changed, 23 insertions(+), 4 deletions(-) - -diff --git a/daemons/fenced/fenced_commands.c b/daemons/fenced/fenced_commands.c -index a43a88f..94aa6b8 100644 ---- a/daemons/fenced/fenced_commands.c -+++ b/daemons/fenced/fenced_commands.c -@@ -3498,7 +3498,7 @@ stonith_command(pcmk__client_t *client, uint32_t id, uint32_t flags, - .result = PCMK__UNKNOWN_RESULT, - }; - -- request.op = crm_element_value(request.xml, F_STONITH_OPERATION); -+ request.op = crm_element_value_copy(request.xml, F_STONITH_OPERATION); - CRM_CHECK(request.op != NULL, return); - - if (pcmk_is_set(request.call_options, st_opt_sync_call)) { -@@ -3506,6 +3506,6 @@ stonith_command(pcmk__client_t *client, uint32_t id, uint32_t flags, - } - - handle_request(&request); -- pcmk__reset_result(&request.result); -+ pcmk__reset_request(&request); - } - } -diff --git a/include/crm/common/messages_internal.h b/include/crm/common/messages_internal.h -index edbd836..2ba5bd9 100644 ---- a/include/crm/common/messages_internal.h -+++ b/include/crm/common/messages_internal.h -@@ -50,11 +50,14 @@ typedef struct { - * generically, but each daemon uses a different XML attribute for it, - * so the daemon is responsible for populating this field. - * -+ * This must be a copy of the XML field, and not just a pointer into xml, -+ * because handlers might modify the original XML. -+ * - * @TODO Create a per-daemon struct with IPC handlers, IPC endpoints, etc., - * and the name of the XML attribute for IPC commands, then replace this -- * with a convenience function to grab the command. -+ * with a convenience function to copy the command. - */ -- const char *op; // IPC command from xml -+ char *op; // IPC command name - } pcmk__request_t; - - #define pcmk__set_request_flags(request, flags_to_set) do { \ -@@ -72,6 +75,7 @@ typedef struct { - const char *pcmk__message_name(const char *name); - GHashTable *pcmk__register_handlers(pcmk__server_command_t handlers[]); - xmlNode *pcmk__process_request(pcmk__request_t *request, GHashTable *handlers); -+void pcmk__reset_request(pcmk__request_t *request); - - /*! - * \internal -diff --git a/lib/common/messages.c b/lib/common/messages.c -index 4f8777d..1c5f467 100644 ---- a/lib/common/messages.c -+++ b/lib/common/messages.c -@@ -276,3 +276,18 @@ pcmk__process_request(pcmk__request_t *request, GHashTable *handlers) - - return (*handler)(request); - } -+ -+/*! -+ * \internal -+ * \brief Free memory used within a request (but not the request itself) -+ * -+ * \param[in] request Request to reset -+ */ -+void -+pcmk__reset_request(pcmk__request_t *request) -+{ -+ free(request->op); -+ request->op = NULL; -+ -+ pcmk__reset_result(&(request->result)); -+} --- -1.8.3.1 - diff --git a/pacemaker.spec b/pacemaker.spec index 46a9016..09f1ed4 100644 --- a/pacemaker.spec +++ b/pacemaker.spec @@ -31,11 +31,11 @@ ## Upstream pacemaker version, and its package version (specversion ## can be incremented to build packages reliably considered "newer" ## than previously built packages with the same pcmkversion) -%global pcmkversion 2.1.3 -%global specversion 3 +%global pcmkversion 2.1.4 +%global specversion 0.1.rc1 ## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build -%global commit da2fd79c89a8b148a2505b57b31e22a187c10d4f +%global commit ea9bebf6c6af8aafa5fb3a407defe9f11bde919d ## Since git v2.11, the extent of abbreviation is autoscaled by default ## (used to be constant of 7), so we need to convey it for non-tags, too. @@ -217,8 +217,6 @@ Source0: https://codeload.github.com/%{github_owner}/%{name}/tar.gz/%{arch Source1: https://codeload.github.com/%{github_owner}/%{nagios_name}/tar.gz/%{nagios_archive_github_url} # upstream commits -Patch0: 0001-Fix-fencer-get-target-by-attribute-working-again.patch -Patch1: 0002-Fix-fencer-avoid-use-after-free-with-self-fencing-an.patch Requires: resource-agents Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release} @@ -812,6 +810,11 @@ exit 0 %license %{nagios_name}-%{nagios_hash}/COPYING %changelog +* Wed Jun 8 2022 Klaus Wenninger - 2.1.4-0.1.rc1 +- Update for new upstream tarball for release candidate: Pacemaker-2.1.4-rc1, + for full details, see included ChangeLog file or + https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.4-rc1 + * Tue Jun 7 2022 Klaus Wenninger - 2.1.3-3 - Update for new upstream release tarball: Pacemaker-2.1.3 for full details, see included ChangeLog file or diff --git a/sources b/sources index 91255a0..156f437 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (nagios-agents-metadata-105ab8a7b2c16b9a29cf1c1596b80136eeef332b.tar.gz) = 11ddeb48a4929e7642b6dfa9c7962aa1d7a1af1c569830f55ed6cd6773abac13377317327bc1db8411c8077884f83f81cc54d746c834b63a99fa6dc219b5caad -SHA512 (pacemaker-da2fd79c8.tar.gz) = 881bafd528a25a18e618bf56cecd776d4114231ff72c87a57b83fe786092ad6b90aef069ecdd95357ca6fe77f8b4ba87379221d6426963dba46c7df723b3ff8a +SHA512 (pacemaker-ea9bebf6c.tar.gz) = d87e09ced7535c24ccc9af0893e1fb30742fc94c3acfbfbc302a2cc96eee4ed60df362d4ba2538444906a7611e2e664bb091ec71943b8d3b89a1424b6c1acc0b