From d37559032f480b2bd0c7b0f48961d75a7c9c8683 Mon Sep 17 00:00:00 2001 From: pkgagent Date: Wed, 5 Aug 2026 12:02:17 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20CVE-2026-49975:=20account=20merged=20cook?= =?UTF-8?q?ie=20headers=20as=20add=20to=20keep=20LimitRequestFields=20effe?= =?UTF-8?q?ctive=20and=20i=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mod_http2-2.0.9-CVE-2026-49975.patch | 39 ++++++++++++++++++++++++++++ mod_http2.spec | 9 +++++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 mod_http2-2.0.9-CVE-2026-49975.patch diff --git a/mod_http2-2.0.9-CVE-2026-49975.patch b/mod_http2-2.0.9-CVE-2026-49975.patch new file mode 100644 index 0000000..bfd9b23 --- /dev/null +++ b/mod_http2-2.0.9-CVE-2026-49975.patch @@ -0,0 +1,39 @@ +From 35c6e405390ed361189a82acd96675401ea5947c Mon Sep 17 00:00:00 2001 +From: Stefan Eissing +Date: Wed, 27 May 2026 11:27:30 +0200 +Subject: [PATCH] cookie reqest header counting (#324) + +* cookie reqest header counting + +Account merged cookie headers as an "add" to keep LimitRequestFields effective. + +* ignore duplicate empty cookie headers + +Adapted-by: PkgAgent (modified to adapt to opencloudos-stream; upstream req_add_header signature vs h2_req_add_header) +--- + mod_http2/h2_util.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/mod_http2/h2_util.c b/mod_http2/h2_util.c +index f40bce1..d1e56ab 100644 +--- a/mod_http2/h2_util.c ++++ b/mod_http2/h2_util.c +@@ -1682,6 +1682,8 @@ apr_status_t h2_req_add_header(apr_table_t *headers, apr_pool_t *pool, + if (existing) { + char *nval; + ++ if (!vlen) ++ return APR_SUCCESS; + /* Cookie header come separately in HTTP/2, but need + * to be merged by "; " (instead of default ", ") + */ +@@ -1692,6 +1694,8 @@ apr_status_t h2_req_add_header(apr_table_t *headers, apr_pool_t *pool, + hvalue = apr_pstrndup(pool, value, vlen); + nval = apr_psprintf(pool, "%s; %s", existing, hvalue); + apr_table_setn(headers, "Cookie", nval); ++ /* Treat the merge as an "add" to not escape LimitRequestFields */ ++ *pwas_added = 1; + return APR_SUCCESS; + } + } + diff --git a/mod_http2.spec b/mod_http2.spec index 7553fd7..96a9546 100644 --- a/mod_http2.spec +++ b/mod_http2.spec @@ -3,10 +3,11 @@ Summary: HTTP/2 module for Apache httpd Name: mod_http2 Version: 2.0.9 -Release: 7%{?dist} +Release: 8%{?dist} License: ASL 2.0 URL: https://icing.github.io/mod_h2/ Source0: https://github.com/icing/mod_h2/releases/download/v%{version}/mod_http2-%{version}.tar.gz +Patch0001: mod_http2-2.0.9-CVE-2026-49975.patch BuildRequires: make gcc pkgconfig autoconf libtool BuildRequires: httpd-devel libnghttp2-devel openssl-devel /usr/bin/hostname @@ -17,7 +18,7 @@ This module provides HTTP/2 (RFC 7540) support for the Apache HTTP Server. It relies on libnghttp2 to provide the core http/2 engine. %prep -%autosetup +%autosetup -p1 %build autoreconf -i @@ -41,6 +42,10 @@ echo "LoadModule proxy_http2_module modules/mod_proxy_http2.so" > %{buildroot}%{ %{_httpd_moddir}/mod_proxy_http2.so %changelog +* Wed Aug 05 2026 PkgAgent Robot - 2.0.9-8 +- [Type] security +- [DESC] Fix CVE-2026-49975: account merged cookie headers as add to keep LimitRequestFields effective and ignore duplicate empty cookie headers + * Thu Sep 26 2024 OpenCloudOS Release Engineering - 2.0.9-7 - Rebuilt for clarifying the packages requirement in BaseOS and AppStream -- Gitee