import UBI apr-util-1.6.1-9.el8

This commit is contained in:
eabdullin 2023-11-15 03:02:13 +00:00
parent 2a5e39ab86
commit 560ed1b9ed
2 changed files with 135 additions and 4 deletions

View File

@ -0,0 +1,123 @@
From 828d644c8eba8765843985d9293f033898ed0592 Mon Sep 17 00:00:00 2001
From: Joe Orton <jorton@apache.org>
Date: Fri, 3 Feb 2023 15:12:10 +0000
Subject: [PATCH] * memcache/apr_memcache.c (conn_connect): Allow use of IPv6
rather than forcing name resolution to IPv4 only.
Submitted by: Lubos Uhliarik <luhliari redhat.com>
Github: closes #39
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907242 13f79535-47bb-0310-9956-ffa450edef68
---
memcache/apr_memcache.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/memcache/apr_memcache.c b/memcache/apr_memcache.c
index 5f8135c52c..18806281a4 100644
--- a/memcache/apr_memcache.c
+++ b/memcache/apr_memcache.c
@@ -290,9 +290,9 @@ static apr_status_t conn_connect(apr_memcache_conn_t *conn)
apr_status_t rv = APR_SUCCESS;
apr_sockaddr_t *sa;
#if APR_HAVE_SOCKADDR_UN
- apr_int32_t family = conn->ms->host[0] != '/' ? APR_INET : APR_UNIX;
+ apr_int32_t family = conn->ms->host[0] != '/' ? APR_UNSPEC : APR_UNIX;
#else
- apr_int32_t family = APR_INET;
+ apr_int32_t family = APR_UNSPEC;
#endif
rv = apr_sockaddr_info_get(&sa, conn->ms->host, family, conn->ms->port, 0, conn->p);
@@ -328,9 +328,9 @@ mc_conn_construct(void **conn_, void *params, apr_pool_t *pool)
apr_pool_t *tp;
apr_memcache_server_t *ms = params;
#if APR_HAVE_SOCKADDR_UN
- apr_int32_t family = ms->host[0] != '/' ? APR_INET : APR_UNIX;
+ apr_int32_t family = ms->host[0] != '/' ? APR_UNSPEC : APR_UNIX;
#else
- apr_int32_t family = APR_INET;
+ apr_int32_t family = APR_UNSPEC;
#endif
rv = apr_pool_create(&np, pool);
From 59341af138dd2c6fe9444ee9c865b769c0053bdd Mon Sep 17 00:00:00 2001
From: Joe Orton <jorton@apache.org>
Date: Tue, 27 Jun 2023 14:06:09 +0000
Subject: [PATCH] * memcache/apr_memcache.c (conn_connect, mc_conn_construct):
Fix regression in IPv4 handling in r1907242. Cycle through the address
list handling v4/v6 addresses correctly.
Submitted by: Lubos Uhliarik <luhliari redhat.com>
Github: closes #44
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1910629 13f79535-47bb-0310-9956-ffa450edef68
---
memcache/apr_memcache.c | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/memcache/apr_memcache.c b/memcache/apr_memcache.c
index 41b93a0a33..09779d91b5 100644
--- a/memcache/apr_memcache.c
+++ b/memcache/apr_memcache.c
@@ -300,14 +300,26 @@ static apr_status_t conn_connect(apr_memcache_conn_t *conn)
return rv;
}
- rv = apr_socket_timeout_set(conn->sock, 1 * APR_USEC_PER_SEC);
- if (rv != APR_SUCCESS) {
- return rv;
+ /* Cycle through address until a connect() succeeds. */
+ for (; sa; sa = sa->next) {
+ rv = apr_socket_create(&conn->sock, sa->family, SOCK_STREAM, 0, conn->p);
+ if (rv == APR_SUCCESS) {
+ rv = apr_socket_timeout_set(conn->sock, 1 * APR_USEC_PER_SEC);
+ if (rv != APR_SUCCESS) {
+ return rv;
+ }
+
+ rv = apr_socket_connect(conn->sock, sa);
+ if (rv == APR_SUCCESS) {
+ break;
+ }
+
+ apr_socket_close(conn->sock);
+ }
}
- rv = apr_socket_connect(conn->sock, sa);
- if (rv != APR_SUCCESS) {
- return rv;
+ if (!sa) {
+ return APR_ECONNREFUSED;
}
rv = apr_socket_timeout_set(conn->sock, -1);
@@ -327,11 +339,6 @@ mc_conn_construct(void **conn_, void *params, apr_pool_t *pool)
apr_pool_t *np;
apr_pool_t *tp;
apr_memcache_server_t *ms = params;
-#if APR_HAVE_SOCKADDR_UN
- apr_int32_t family = ms->host[0] != '/' ? APR_UNSPEC : APR_UNIX;
-#else
- apr_int32_t family = APR_UNSPEC;
-#endif
rv = apr_pool_create(&np, pool);
if (rv != APR_SUCCESS) {
@@ -349,13 +356,6 @@ mc_conn_construct(void **conn_, void *params, apr_pool_t *pool)
conn->p = np;
conn->tp = tp;
- rv = apr_socket_create(&conn->sock, family, SOCK_STREAM, 0, np);
-
- if (rv != APR_SUCCESS) {
- apr_pool_destroy(np);
- return rv;
- }
-
conn->buffer = apr_palloc(conn->p, BUFFER_SIZE + 1);
conn->blen = 0;
conn->ms = ms;

View File

@ -16,7 +16,7 @@
Summary: Apache Portable Runtime Utility library
Name: apr-util
Version: 1.6.1
Release: 6%{?dist}.1
Release: 9%{?dist}
License: ASL 2.0
Group: System Environment/Libraries
URL: http://apr.apache.org/
@ -24,6 +24,8 @@ Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
Patch1: apr-util-1.2.7-pkgconf.patch
Patch4: apr-util-1.4.1-private.patch
Patch5: apr-util-mariadb-upstream.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2063562
Patch6: apr-util-1.6.1-r1907242+.patch
# Security patches:
# https://bugzilla.redhat.com/show_bug.cgi?id=2169652
@ -137,6 +139,7 @@ This package provides the NSS crypto support for the apr-util.
%patch1 -p1 -b .pkgconf
%patch4 -p1 -b .private
%patch5 -p1 -b .maria
%patch6 -p1 -b .r1907242
%patch100 -p1 -b .CVE-2022-25147
@ -248,9 +251,14 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/aclocal/*.m4
%changelog
* Tue May 09 2023 Luboš Uhliarik <luhliari@redhat.com> - 1.6.1-6.1
- Resolves: #2196572 - CVE-2022-25147 apr-util: out-of-bounds writes
in the apr_base64
* Tue Jun 27 2023 Luboš Uhliarik <luhliari@redhat.com> - 1.6.1-9
- Related: #2063562 - mod_auth_openidc fails with IPv6 OIDCMemCacheServers
* Mon Jun 12 2023 Luboš Uhliarik <luhliari@redhat.com> - 1.6.1-8
- Resolves: #2063562 - mod_auth_openidc fails with IPv6 OIDCMemCacheServers
* Wed May 31 2023 Luboš Uhliarik <luhliari@redhat.com> - 1.6.1-7
- Resolves: #2196573 - CVE-2022-25147 apr-util: out-of-bounds writes in the apr_base64
* Mon Oct 1 2018 Joe Orton <jorton@redhat.com> - 1.6.1-6
- Recommends: apr-util-openssl, apr-util-bdb (#1633973)