diff --git a/RHEL-81939-check-child-register-again.patch b/RHEL-81939-check-child-register-again.patch new file mode 100644 index 0000000..5f30bbf --- /dev/null +++ b/RHEL-81939-check-child-register-again.patch @@ -0,0 +1,41 @@ +commit d2f5e5595a511ff62934c77cb62f82bdb2320e29 +Author: Yonglong Li +Date: Fri Dec 29 11:03:08 2023 +0800 + + lvs: if lost misc check child register checker agagin + + issue: misc check_child_thread timeout and remove child_pid + form rb_data, timeout callback of check_child_thread is not be + called, if at this time misc script done and exit, and child + termination will do nothing because child_pid was remove form + rb_data. in this case timeou callback will not register checker + again, the checker will lost. + + fix: if lost misc check child register checker again + + Signed-off-by: Yonglong Li + +diff --git a/keepalived/check/check_misc.c b/keepalived/check/check_misc.c +index b2260d5f..c388e89d 100644 +--- a/keepalived/check/check_misc.c ++++ b/keepalived/check/check_misc.c +@@ -337,9 +337,10 @@ misc_check_child_thread(thread_ref_t thread) + /* The process does not exist, and we should + * have reaped its exit status, otherwise it + * would exist as a zombie process. */ +- log_message(LOG_INFO, "Misc script %s child (PID %d) lost", misck_checker->script.args[0], pid); ++ log_message(LOG_INFO, "Misc script %s child (PID %d) lost, register checker again", misck_checker->script.args[0], pid); + misck_checker->state = SCRIPT_STATE_IDLE; + timeout = 0; ++ goto recheck; + } else { + log_message(LOG_INFO, "kill -%d of process %s(%d) with new state %u failed with errno %d", sig_num, misck_checker->script.args[0], pid, misck_checker->state, errno); + timeout = 1000; +@@ -488,6 +489,7 @@ misc_check_child_thread(thread_ref_t thread) + } + } + ++recheck: + /* Register next timer checker */ + next_time = timer_add_long(misck_checker->last_ran, checker->retry_it ? checker->delay_before_retry : checker->delay_loop); + next_time = timer_sub_now(next_time); diff --git a/keepalived.spec b/keepalived.spec index 159efe8..d85bf68 100644 --- a/keepalived.spec +++ b/keepalived.spec @@ -11,13 +11,14 @@ Name: keepalived Summary: High Availability monitor built upon LVS, VRRP and service pollers Version: 2.2.8 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: http://www.keepalived.org/ Source0: http://www.keepalived.org/software/keepalived-%{version}.tar.gz Source1: keepalived.service Patch0: validate-ipset-names-better.patch +Patch1: RHEL-81939-check-child-register-again.patch Requires(post): systemd Requires(preun): systemd @@ -110,6 +111,10 @@ mkdir -p %{buildroot}%{_libexecdir}/keepalived %{_mandir}/man8/keepalived.8* %changelog +* Mon Mar 10 2025 Christine Caulfield - 2.2.8-5 +- lvs: if lost misc check child register checker again + Resolves: RHEL-81939 + * Mon Dec 2 2024 Christine Caulfield - 2.2.8-4 - Better validation of ipsetnames for CVE-2024-41184 Resolves: RHEL-49558