!108 update to version 2.9.5

From: @Venland 
Reviewed-by: @wang--ge 
Signed-off-by: @wang--ge
This commit is contained in:
openeuler-ci-bot 2024-02-19 03:35:24 +00:00 committed by Gitee
commit 03616f09f3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 5 additions and 79 deletions

View File

@ -1,43 +0,0 @@
From 15c3d20e315f1f06c9649ae598de86d61d41085b Mon Sep 17 00:00:00 2001
From: eaglegai <eaglegai@163.com>
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);

View File

@ -1,31 +0,0 @@
From ef667b1ad89bb159b1991de0ec07d17e4320df23 Mon Sep 17 00:00:00 2001
From: eaglegai <eaglegai@163.com>
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)

Binary file not shown.

BIN
haproxy-2.9.5.tar.gz Normal file

Binary file not shown.

View File

@ -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 <izmirvii@gmail.com> - 2.9.5-1
- update to version 2.9.5
* Wed Oct 11 2023 yaoxin <yao_xin001@hoperun.com> - 2.6.15-1
- Upgrade to 2.6.15