Fix bundled urllib3 CVE-2026-44431 in resource-agents

Backport upstream urllib3 fix for CVE-2026-44431
(GHSA-qccp-gfcp-xxvc) to the bundled urllib3 1.26.18 in
resource-agents. The patch adds header stripping in
connectionpool.py for cross-origin redirects when using
proxy pools directly, complementing the existing protection
in poolmanager.py. Both bundled locations (aliyun and gcp)
are patched.

CVE: CVE-2026-44431
Upstream patches:
 - 5ec0de499b.patch
Resolves: RHEL-178598

This commit was backported by Ymir, a Red Hat Enterprise Linux software maintenance AI agent.

Assisted-by: Ymir
This commit is contained in:
RHEL Packaging Agent 2026-07-09 11:28:42 +00:00
parent 0e6350feed
commit e7ee6a21f5
2 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,43 @@
--- a/aliyun/aliyunsdkcore/vendored/requests/packages/urllib3/connectionpool.py
+++ b/aliyun/aliyunsdkcore/vendored/requests/packages/urllib3/connectionpool.py
@@ -850,6 +850,18 @@
body = None
headers = HTTPHeaderDict(headers)._prepare_for_method_change()
+ # Strip headers marked as unsafe to forward to the redirected location.
+ # Check remove_headers_on_redirect to avoid a potential network call within
+ # self.is_same_host() which may use socket.gethostbyname() in the future.
+ if retries.remove_headers_on_redirect and not self.is_same_host(
+ redirect_location
+ ):
+ new_headers = headers.copy()
+ for header in headers:
+ if header.lower() in retries.remove_headers_on_redirect:
+ new_headers.pop(header, None)
+ headers = new_headers
+
try:
retries = retries.increment(method, url, response=response, _pool=self)
except MaxRetryError:
--- a/gcp/google-cloud-sdk/lib/third_party/urllib3/connectionpool.py
+++ b/gcp/google-cloud-sdk/lib/third_party/urllib3/connectionpool.py
@@ -850,6 +850,18 @@
body = None
headers = HTTPHeaderDict(headers)._prepare_for_method_change()
+ # Strip headers marked as unsafe to forward to the redirected location.
+ # Check remove_headers_on_redirect to avoid a potential network call within
+ # self.is_same_host() which may use socket.gethostbyname() in the future.
+ if retries.remove_headers_on_redirect and not self.is_same_host(
+ redirect_location
+ ):
+ new_headers = headers.copy()
+ for header in headers:
+ if header.lower() in retries.remove_headers_on_redirect:
+ new_headers.pop(header, None)
+ headers = new_headers
+
try:
retries = retries.increment(method, url, response=response, _pool=self)
except MaxRetryError:

View File

@ -73,7 +73,7 @@
Name: resource-agents
Summary: Open Source HA Reusable Cluster Resource Scripts
Version: 4.9.0
Release: 54%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.35
Release: 55%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
License: GPLv2+ and LGPLv2+
URL: https://github.com/ClusterLabs/resource-agents
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
@ -208,6 +208,7 @@ Patch1014: RHEL-139760-fix-bundled-urllib3-CVE-2025-66471.patch
Patch1015: RHEL-140787-RHEL-146289-fix-bundled-urllib3-CVE-2026-21441.patch
Patch1016: RHEL-142448-fix-bundled-pyasn1-CVE-2026-23490.patch
Patch1017: RHEL-157190-fix-bundled-pyasn1-CVE-2026-30922.patch
Patch1018: RHEL-178598-fix-bundled-urllib3-CVE-2026-44431.patch
Obsoletes: heartbeat-resources <= %{version}
Provides: heartbeat-resources = %{version}
@ -775,6 +776,7 @@ pushd %{buildroot}/usr/lib/%{name}/%{bundled_lib_dir}
/usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 < %{PATCH1015}
/usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 < %{PATCH1016}
/usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=2 < %{PATCH1017}
/usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 < %{PATCH1018}
popd
%endif
@ -1069,6 +1071,11 @@ ccs_update_schema > /dev/null 2>&1 ||:
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
%changelog
* Thu Jul 9 2026 RHEL Packaging Agent <redhat-ymir-agent@redhat.com> - 4.9.0-55
- bundled urllib3: fix CVE-2026-44431
Resolves: RHEL-178598
* Wed Jun 10 2026 Arslan Ahmad <arahmad@redhat.com> - 4.9.0-54.35
- nfsserver: stop fsidd when stopping nfsserver