diff --git a/backport-ssl_sock-add-check-for-ha_meth.patch b/backport-ssl_sock-add-check-for-ha_meth.patch deleted file mode 100644 index bccdbd9dc7ae1c24757aa3ca66597d9da97e1d00..0000000000000000000000000000000000000000 --- a/backport-ssl_sock-add-check-for-ha_meth.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 15c3d20e315f1f06c9649ae598de86d61d41085b Mon Sep 17 00:00:00 2001 -From: eaglegai -Date: Fri, 26 May 2023 16:42:47 +0800 -Subject: [PATCH] BUG/MINOR: ssl_sock: add check for ha_meth - -in __ssl_sock_init, BIO_meth_new may failed and return NULL if -OPENSSL_zalloc failed. in this case, ha_meth will be NULL, and then -crash happens in BIO_meth_set_write. So, we add a check for ha_meth. - -Conflict:NA -Reference:https://github.com/haproxy/haproxy/commit/15c3d20e315f1f06c9649ae598de86d61d41085b - ---- - src/ssl_sock.c | 16 +++++++++------- - 1 file changed, 9 insertions(+), 7 deletions(-) - -diff --git a/src/ssl_sock.c b/src/ssl_sock.c -index e637b0423a9a..ff0db9d1a1c2 100644 ---- a/src/ssl_sock.c -+++ b/src/ssl_sock.c -@@ -7561,13 +7561,15 @@ static void __ssl_sock_init(void) - ERR_load_SSL_strings(); - #endif - ha_meth = BIO_meth_new(0x666, "ha methods"); -- BIO_meth_set_write(ha_meth, ha_ssl_write); -- BIO_meth_set_read(ha_meth, ha_ssl_read); -- BIO_meth_set_ctrl(ha_meth, ha_ssl_ctrl); -- BIO_meth_set_create(ha_meth, ha_ssl_new); -- BIO_meth_set_destroy(ha_meth, ha_ssl_free); -- BIO_meth_set_puts(ha_meth, ha_ssl_puts); -- BIO_meth_set_gets(ha_meth, ha_ssl_gets); -+ if (ha_meth != NULL) { -+ BIO_meth_set_write(ha_meth, ha_ssl_write); -+ BIO_meth_set_read(ha_meth, ha_ssl_read); -+ BIO_meth_set_ctrl(ha_meth, ha_ssl_ctrl); -+ BIO_meth_set_create(ha_meth, ha_ssl_new); -+ BIO_meth_set_destroy(ha_meth, ha_ssl_free); -+ BIO_meth_set_puts(ha_meth, ha_ssl_puts); -+ BIO_meth_set_gets(ha_meth, ha_ssl_gets); -+ } - - HA_SPIN_INIT(&ckch_lock); - diff --git a/backport-thread-add-a-check-for-pthread_create.patch b/backport-thread-add-a-check-for-pthread_create.patch deleted file mode 100644 index 61cd0b40de7052781b6440b2b9a78b975d734aed..0000000000000000000000000000000000000000 --- a/backport-thread-add-a-check-for-pthread_create.patch +++ /dev/null @@ -1,31 +0,0 @@ -From ef667b1ad89bb159b1991de0ec07d17e4320df23 Mon Sep 17 00:00:00 2001 -From: eaglegai -Date: Fri, 26 May 2023 16:44:34 +0800 -Subject: [PATCH] BUG/MINOR: thread: add a check for pthread_create - -preload_libgcc_s() use pthread_create to create a thread and then call -pthread_join to use it, but it doesn't check if the option is successful. -So add a check to aviod potential crash. - -Conflict:NA -Reference:https://github.com/haproxy/haproxy/commit/ef667b1ad89bb159b1991de0ec07d17e4320df23 - ---- - src/thread.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/thread.c b/src/thread.c -index d7128252ed0e..b41b6628a4cb 100644 ---- a/src/thread.c -+++ b/src/thread.c -@@ -1066,8 +1066,8 @@ static void *dummy_thread_function(void *data) - static inline void preload_libgcc_s(void) - { - pthread_t dummy_thread; -- pthread_create(&dummy_thread, NULL, dummy_thread_function, NULL); -- pthread_join(dummy_thread, NULL); -+ if (pthread_create(&dummy_thread, NULL, dummy_thread_function, NULL) == 0) -+ pthread_join(dummy_thread, NULL); - } - - static void __thread_init(void) diff --git a/haproxy-2.6.15.tar.gz b/haproxy-2.9.5.tar.gz similarity index 35% rename from haproxy-2.6.15.tar.gz rename to haproxy-2.9.5.tar.gz index 5acb0f042b75560a165e37140229cb4bcb587415..bff23afaf1ce201341bdd7d32d1c2db77dcb0457 100644 Binary files a/haproxy-2.6.15.tar.gz and b/haproxy-2.9.5.tar.gz differ diff --git a/haproxy.spec b/haproxy.spec index fa7c90e624b1259f96ac4ca88318e459be1ff51d..142484e27f2acd6cd03a19d83048b1c6c48ed636 100644 --- a/haproxy.spec +++ b/haproxy.spec @@ -4,21 +4,18 @@ %global _hardened_build 1 Name: haproxy -Version: 2.6.15 +Version: 2.9.5 Release: 1 Summary: The Reliable, High Performance TCP/HTTP Load Balancer License: GPLv2+ URL: https://www.haproxy.org/ -Source0: https://www.haproxy.org/download/2.6/src/%{name}-%{version}.tar.gz +Source0: https://www.haproxy.org/download/2.9/src/%{name}-%{version}.tar.gz Source1: %{name}.service Source2: %{name}.cfg Source3: %{name}.logrotate Source4: %{name}.sysconfig -Patch0: backport-ssl_sock-add-check-for-ha_meth.patch -Patch1: backport-thread-add-a-check-for-pthread_create.patch - BuildRequires: gcc lua-devel pcre2-devel openssl-devel systemd-devel systemd libatomic Requires(pre): shadow-utils @@ -120,6 +117,9 @@ exit 0 %{_mandir}/man1/* %changelog +* Mon Feb 19 2024 liweigang - 2.9.5-1 +- update to version 2.9.5 + * Wed Oct 11 2023 yaoxin - 2.6.15-1 - Upgrade to 2.6.15