diff mbox series

[meta-webserver,wrynose,02/10] nginx: fix CVE-2026-123633

Message ID 20261125061529.2721522-2-hthakar@cisco.com
State New
Headers show
Series [meta-webserver,wrynose,01/10] nginx: fix CVE-2026-97205 | expand

Commit Message

From: Hetvi Thakar <hthakar@cisco.com>

This patch applies the upstream nginx stable backport for
CVE-2026-123633. The upstream fix commit is referenced in [1],
and the public CVE advisory is referenced in [2].

[1] https://github.com/nginx/nginx/commit/0c87dd1db413e440a4e3ef7ee8acc518509e8809
[2] https://ubuntu.com/security/CVE-2026-123633

Signed-off-by: Hetvi Thakar <hthakar@cisco.com>
---
 .../nginx/files/CVE-2026-123633.patch         | 49 +++++++++++++++++++
 .../recipes-httpd/nginx/nginx_1.28.3.bb       |  1 +
 .../recipes-httpd/nginx/nginx_1.29.7.bb       |  1 +
 3 files changed, 51 insertions(+)
 create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-123633.patch
diff mbox series

Patch

diff --git a/meta-webserver/recipes-httpd/nginx/files/CVE-2026-123633.patch b/meta-webserver/recipes-httpd/nginx/files/CVE-2026-123633.patch
new file mode 100644
index 0000000000..c84c7acae5
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/files/CVE-2026-123633.patch
@@ -0,0 +1,49 @@ 
+From 0c87dd1db413e440a4e3ef7ee8acc518509e8809 Mon Sep 17 00:00:00 2001
+From: Roman Arutyunyan <arut@nginx.com>
+Date: Thu, 17 Sep 2026 16:10:11 +0400
+Subject: [PATCH] HTTP/2: reset reusable connection status on stream creation
+
+Previously, an HTTP/2 connection could be reusable while having streams.
+This could result in an attempt to drain the connection while processing
+one if its streams, for example when connecting to an upstream.  After
+recognizing that the connection has streams, an attempt to send the
+GOAWAY frame was made.  On send failure, the connection was immediately
+closed and its pool released.  This triggered a use-after-free up the
+stack.
+
+Having an HTTP/2 connection with streams registered as reusable became
+possible after 76672e650.  A connection with no streams and a partial
+frame read from client was registered as reusable to avoid DoS attacks.
+So if a client sends only the first HEADERS frame byte, the connection
+becomes reusable.  Later, when the remaining HEADERS bytes are received
+and a new stream is created, the reusable status is not reset until the
+connection becomes idle.
+
+Fix is to mark the connection non-reusable upon stream creation.
+
+Reported by Albert @ Vexera AI.
+
+CVE: CVE-2026-123633
+Upstream-Status: Backport [https://github.com/nginx/nginx/commit/0c87dd1db413e440a4e3ef7ee8acc518509e8809]
+
+Signed-off-by: Hetvi Thakar <hthakar@cisco.com>
+---
+ src/http/v2/ngx_http_v2.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
+index b2eef36..0db2b1d 100644
+--- a/src/http/v2/ngx_http_v2.c
++++ b/src/http/v2/ngx_http_v2.c
+@@ -3097,6 +3097,8 @@ ngx_http_v2_create_stream(ngx_http_v2_connection_t *h2c)
+ 
+     h2c->processing++;
+ 
++    ngx_reusable_connection(h2c->connection, 0);
++
+     h2c->priority_limit += h2scf->concurrent_streams;
+ 
+     if (h2c->connection->read->timer_set) {
+-- 
+2.35.6
+
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb
index 3b14e18d4b..d7a4ac0820 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb
@@ -19,6 +19,7 @@  SRC_URI:append = " \
     file://CVE-2026-97629.patch \
     file://CVE-2026-15176.patch \
     file://CVE-2026-97205.patch \
+    file://CVE-2026-123633.patch \
 "
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3dc49537b08b14c8b66ad247bb4c4593"
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb
index 317981a6fa..59a395f670 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb
@@ -19,6 +19,7 @@  SRC_URI:append = " \
     file://CVE-2026-97629.patch \
     file://CVE-2026-15176.patch \
     file://CVE-2026-97205.patch \
+    file://CVE-2026-123633.patch \
 "
 
 # 1.28.x branch is the current stable branch, the recommended default