Skip to contentSkip to conversation

nginx: fix nginx2root related CVEs

PATCH New Patrick Vogelaar 1 participant 6 messages Nov 23

lore
Share & tools
lore
#0 lore raw

cover nginx: fix nginx2root related CVEs

this patch set fixes the 5 CVEs listed in nginx2root [0] fox nginx 1.26:

* CVE-2026-123007
* CVE-2026-123634
* CVE-2026-123633
* CVE-2026-121810
* CVE-2026-113425

[0] https://nginx2root.com/

---
Patrick Vogelaar (5):

      nginx: fix for CVE-2026-123007
      nginx: fix for CVE-2026-123634
      nginx: fix for CVE-2026-123633
      nginx: fix for CVE-2026-121810
      nginx: fix for CVE-2026-113425
 .../nginx/nginx-1.26.3/CVE-2026-113425-01.patch    |  94 ++++++++++++++
 .../nginx/nginx-1.26.3/CVE-2026-113425-02.patch    |  44 +++++++
 .../nginx/nginx-1.26.3/CVE-2026-113425-03.patch    |  87 +++++++++++++
 .../nginx/nginx-1.26.3/CVE-2026-113425-04.patch    |  72 +++++++++++
 .../nginx/nginx-1.26.3/CVE-2026-113425-05.patch    | 116 +++++++++++++++++
 .../nginx/nginx-1.26.3/CVE-2026-121810.patch       |  70 +++++++++++
 .../nginx/nginx-1.26.3/CVE-2026-123007.patch       |  95 ++++++++++++++
 .../nginx/nginx-1.26.3/CVE-2026-123633.patch       |  52 ++++++++
 .../nginx/nginx-1.26.3/CVE-2026-123634-01.patch    |  75 +++++++++++
 .../nginx/nginx-1.26.3/CVE-2026-123634-02.patch    | 139 +++++++++++++++++++++
 meta-webserver/recipes-httpd/nginx/nginx_1.26.3.bb |  14 ++-
 11 files changed, 857 insertions(+), 1 deletion(-)

---
base-commit: 2db6aece32c7f8ebf6015b468e1b4e21de072e3b
change-id: 20261123-fix_nginx2root-2c819bc77c9f

Best regards,

Signature · 1 line
Patrick Vogelaar <[email protected]>
#1 lore raw

PATCH 1/5 nginx: fix for CVE-2026-123007

Pick patch [0] as mentioned in [1].

[0] https://github.com/nginx/nginx/commit/b89c4100bf6762a45e4a6463eaf4b70368277c94
[1] https://security-tracker.debian.org/tracker/CVE-2026-123007

---
 .../nginx/nginx-1.26.3/CVE-2026-123007.patch       | 95 ++++++++++++++++++++++
 meta-webserver/recipes-httpd/nginx/nginx_1.26.3.bb |  5 +-
 2 files changed, 99 insertions(+), 1 deletion(-)
meta-webserver/recipes-httpd/nginx/nginx-1.26.3/CVE-2026-123007.patch new file +95 -0
new file mode 100644
index 0000000000..80c34af596
@@ -0,0 +1,95 @@
+From 2132cbc91feb99db7439ecd195d49f821469085b Mon Sep 17 00:00:00 2001
+From: Roman Arutyunyan <[email protected]>
+Date: Thu, 29 Oct 2026 21:37:05 +0400
+Subject: [PATCH 01/10] HTTP/2: account for queued frames when validating
+ WINDOW_UPDATE
+
+When a stream is terminated, its unsent payload length is refunded back
+to the connection flow control.  Previously, this could increase the
+flow control beyond NGX_HTTP_V2_MAX_WINDOW, if it was increased by the
+client after the stream frames were queued and before the stream was
+terminated.  This eventually resulted in broken buffer size control in
+ngx_http_v2_send_chain() followed by memory corruption and a possible
+segmentation fault.
+
+The fix is to account for the queued frames when validating a client
+WINDOW_UPDATE.  From the client's point of view, the queued frames
+still belong to the flow control window.
+
+Reported by Xint.io.
+
+(cherry picked from commit b89c4100bf6762a45e4a6463eaf4b70368277c94)
+
+CVE: CVE-2026-123007
+Upstream-Status: Backport [https://github.com/nginx/nginx/commit/b89c4100bf6762a45e4a6463eaf4b70368277c94]
+
+Signed-off-by: Patrick Vogelaar <[email protected]>
+---
+ src/http/v2/ngx_http_v2.c               | 4 ++--
+ src/http/v2/ngx_http_v2.h               | 1 +
+ src/http/v2/ngx_http_v2_filter_module.c | 3 +++
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
+index 0f5bd3de8..7ab97bbf9 100644
+--- a/src/http/v2/ngx_http_v2.c
++++ b/src/http/v2/ngx_http_v2.c
+@@ -2466,13 +2466,13 @@ ngx_http_v2_state_window_update(ngx_http_v2_connection_t *h2c, u_char *pos,
+         return ngx_http_v2_state_complete(h2c, pos, end);
+     }
+ 
+-    if (window > NGX_HTTP_V2_MAX_WINDOW - h2c->send_window) {
++    if (window > NGX_HTTP_V2_MAX_WINDOW - h2c->send_window - h2c->send_queued) {
+         ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+                       "client violated connection flow control: "
+                       "received WINDOW_UPDATE frame "
+                       "with window increment %uz "
+                       "not allowed for window %uz",
+-                      window, h2c->send_window);
++                      window, h2c->send_window + h2c->send_queued);
+ 
+         return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_FLOW_CTRL_ERROR);
+     }
+diff --git a/src/http/v2/ngx_http_v2.h b/src/http/v2/ngx_http_v2.h
+index 6751b3026..a64599daf 100644
+--- a/src/http/v2/ngx_http_v2.h
++++ b/src/http/v2/ngx_http_v2.h
+@@ -136,6 +136,7 @@ struct ngx_http_v2_connection_s {
+     ngx_uint_t                       priority_limit;
+ 
+     size_t                           send_window;
++    size_t                           send_queued;
+     size_t                           recv_window;
+     size_t                           init_window;
+ 
+diff --git a/src/http/v2/ngx_http_v2_filter_module.c b/src/http/v2/ngx_http_v2_filter_module.c
+index 1e2cafaf1..c44954067 100644
+--- a/src/http/v2/ngx_http_v2_filter_module.c
++++ b/src/http/v2/ngx_http_v2_filter_module.c
+@@ -1028,6 +1028,7 @@ ngx_http_v2_send_chain(ngx_connection_t *fc, ngx_chain_t *in, off_t limit)
+             ngx_http_v2_queue_frame(h2c, frame);
+ 
+             h2c->send_window -= frame_size;
++            h2c->send_queued += frame_size;
+ 
+             stream->send_window -= frame_size;
+             stream->queued++;
+@@ -1423,6 +1424,7 @@ done:
+     stream->request->header_size += NGX_HTTP_V2_FRAME_HEADER_SIZE;
+ 
+     h2c->payload_bytes += frame->length;
++    h2c->send_queued -= frame->length;
+ 
+     ngx_http_v2_handle_frame(stream, frame);
+ 
+@@ -1557,6 +1559,7 @@ ngx_http_v2_filter_cleanup(void *data)
+     }
+ 
+     h2c->send_window += window;
++    h2c->send_queued -= window;
+ }
+ 
+ 
+-- 
+2.43.0
+
meta-webserver/recipes-httpd/nginx/nginx_1.26.3.bb +4 -1
index 658b1c0fce..18cd8bbfde 100644
@@ -6,7 +6,10 @@ DEFAULT_PREFERENCE = "-1"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=a6547d7e5628787ee2a9c5a3480eb628"
 
-SRC_URI:append = " file://CVE-2026-28755.patch"
+SRC_URI:append = " \
+                  file://CVE-2026-28755.patch \
+                  file://CVE-2026-123007.patch \
+                  "
 
 SRC_URI[sha256sum] = "69ee2b237744036e61d24b836668aad3040dda461fe6f570f1787eab570c75aa"
 
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/5 nginx: fix for CVE-2026-123634

In reply to Patrick Vogelaar

Pick patch [0] and [1] as mentioned in [2].

[0] https://github.com/nginx/nginx/commit/338f6231e347c17a07c381802b1bc3c20c55b529
[1] https://github.com/nginx/nginx/commit/7426c29f140c330dd6c6cdfeb2943be1978c69e0
[2] https://security-tracker.debian.org/tracker/CVE-2026-123634

---
 .../nginx/nginx-1.26.3/CVE-2026-123634-01.patch    |  75 +++++++++++
 .../nginx/nginx-1.26.3/CVE-2026-123634-02.patch    | 139 +++++++++++++++++++++
 meta-webserver/recipes-httpd/nginx/nginx_1.26.3.bb |   2 +
 3 files changed, 216 insertions(+)
meta-webserver/recipes-httpd/nginx/nginx-1.26.3/CVE-2026-123634-01.patch new file +75 -0
new file mode 100644
index 0000000000..4307fc9a53
@@ -0,0 +1,75 @@
+From 8ef79a87cb5818efd6dfde6a3618b36596ec5617 Mon Sep 17 00:00:00 2001
+From: Roman Arutyunyan <[email protected]>
+Date: Fri, 6 Nov 2026 20:02:09 +0400
+Subject: [PATCH 03/10] Resolver: report error on CNAME restart failure
+
+Previously, if restarting a resolve with a CNAME name failed due to a
+memory allocation error, no error was reported.  The waiting requests
+were left detached from any node until their timeouts expired.
+
+Now the error is reported to the waiting requests immediately.
+
+(cherry picked from commit 338f6231e347c17a07c381802b1bc3c20c55b529)
+CVE:CVE-2026-123634
+Upstream-Status: Backport [https://github.com/nginx/nginx/commit/338f6231e347c17a07c381802b1bc3c20c55b529]
+
+Signed-off-by: Patrick Vogelaar <[email protected]>
+---
+ src/core/ngx_resolver.c | 34 ++++++++++++++++++++++++++++++++--
+ 1 file changed, 32 insertions(+), 2 deletions(-)
+
+diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c
+index c76c17852..b957cd892 100644
+--- a/src/core/ngx_resolver.c
++++ b/src/core/ngx_resolver.c
+@@ -2550,7 +2550,22 @@ ngx_resolver_process_a(ngx_resolver_t *r, u_char *buf, size_t n,
+                 next->node = NULL;
+             }
+ 
+-            (void) ngx_resolve_name_locked(r, ctx, &name);
++            if (ngx_resolve_name_locked(r, ctx, &name) == NGX_ERROR) {
++
++                /* unlock name mutex */
++
++                do {
++                    ctx->state = NGX_ERROR;
++                    ctx->valid = ngx_time() + (r->valid ? r->valid : 10);
++                    next = ctx->next;
++
++                    ctx->handler(ctx);
++
++                    ctx = next;
++                } while (ctx);
++
++                return;
++            }
+         }
+ 
+         /* unlock name mutex */
+@@ -2935,7 +2950,22 @@ ngx_resolver_process_srv(ngx_resolver_t *r, u_char *buf, size_t n,
+                 next->node = NULL;
+             }
+ 
+-            (void) ngx_resolve_name_locked(r, ctx, &name);
++            if (ngx_resolve_name_locked(r, ctx, &name) == NGX_ERROR) {
++
++                /* unlock name mutex */
++
++                do {
++                    ctx->state = NGX_ERROR;
++                    ctx->valid = ngx_time() + (r->valid ? r->valid : 10);
++                    next = ctx->next;
++
++                    ctx->handler(ctx);
++
++                    ctx = next;
++                } while (ctx);
++
++                return;
++            }
+         }
+ 
+         /* unlock name mutex */
+-- 
+2.43.0
+
meta-webserver/recipes-httpd/nginx/nginx-1.26.3/CVE-2026-123634-02.patch new file +139 -0

139 lines not on this page · raw message

meta-webserver/recipes-httpd/nginx/nginx_1.26.3.bb +2 -0
index 18cd8bbfde..2b392fd6d6 100644
@@ -9,6 +9,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a6547d7e5628787ee2a9c5a3480eb628"
 SRC_URI:append = " \
                   file://CVE-2026-28755.patch \
                   file://CVE-2026-123007.patch \
+                  file://CVE-2026-123634-01.patch \
+                  file://CVE-2026-123634-02.patch \
                   "
 
 SRC_URI[sha256sum] = "69ee2b237744036e61d24b836668aad3040dda461fe6f570f1787eab570c75aa"
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/5 nginx: fix for CVE-2026-123633

In reply to Patrick Vogelaar

Pick patch [0] as mentioned in [1].

[0] https://github.com/nginx/nginx/commit/0c87dd1db413e440a4e3ef7ee8acc518509e8809
[1] https://security-tracker.debian.org/tracker/CVE-2026-123633

---
 .../nginx/nginx-1.26.3/CVE-2026-123633.patch       | 52 ++++++++++++++++++++++
 meta-webserver/recipes-httpd/nginx/nginx_1.26.3.bb |  1 +
 2 files changed, 53 insertions(+)
meta-webserver/recipes-httpd/nginx/nginx-1.26.3/CVE-2026-123633.patch new file +52 -0
new file mode 100644
index 0000000000..2656fdb2fd
@@ -0,0 +1,52 @@
+From af325f83ebfa3ed843f691c2542d58e321b8faad Mon Sep 17 00:00:00 2001
+From: Roman Arutyunyan <[email protected]>
+Date: Thu, 17 Sep 2026 16:10:11 +0400
+Subject: [PATCH 02/10] 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.
+
+(cherry picked from commit 0c87dd1db413e440a4e3ef7ee8acc518509e8809)
+
+CVE: CVE-2026-123633
+Upstream-Status: Backport [https://github.com/nginx/nginx/commit/0c87dd1db413e440a4e3ef7ee8acc518509e8809]
+
+Signed-off-by: Patrick Vogelaar <[email protected]>
+---
+ 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 7ab97bbf9..4a7395227 100644
+--- a/src/http/v2/ngx_http_v2.c
++++ b/src/http/v2/ngx_http_v2.c
+@@ -3091,6 +3091,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.43.0
+
meta-webserver/recipes-httpd/nginx/nginx_1.26.3.bb +1 -0
index 2b392fd6d6..5d9fae672b 100644
@@ -11,6 +11,7 @@ SRC_URI:append = " \
                   file://CVE-2026-123007.patch \
                   file://CVE-2026-123634-01.patch \
                   file://CVE-2026-123634-02.patch \
+                  file://CVE-2026-123633.patch \
                   "
 
 SRC_URI[sha256sum] = "69ee2b237744036e61d24b836668aad3040dda461fe6f570f1787eab570c75aa"
Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/5 nginx: fix for CVE-2026-121810

In reply to Patrick Vogelaar

Pick patch [0] as mentioned in [1].

[0] https://github.com/nginx/nginx/commit/c58d2a22d12350766185c94f2245bf4be5bcfb7d
[1] https://security-tracker.debian.org/tracker/CVE-2026-121810

---
 .../nginx/nginx-1.26.3/CVE-2026-121810.patch       | 70 ++++++++++++++++++++++
 meta-webserver/recipes-httpd/nginx/nginx_1.26.3.bb |  1 +
 2 files changed, 71 insertions(+)
meta-webserver/recipes-httpd/nginx/nginx-1.26.3/CVE-2026-121810.patch new file +70 -0
new file mode 100644
index 0000000000..5a360bcebf
@@ -0,0 +1,70 @@
+From 834889f29f789880eb68d4a7b824dc7fd247f65b Mon Sep 17 00:00:00 2001
+From: Roman Arutyunyan <[email protected]>
+Date: Sun, 1 Nov 2026 16:46:22 +0400
+Subject: [PATCH 05/10] QUIC: avoid main connection reuse after creating a
+ stream
+
+Previously, ngx_quic_create_stream() cleared the main connection's
+reusable flag and then called ngx_get_connection() before inserting the
+new stream into the tree.  If the worker was low on free connections,
+the drain inside ngx_get_connection() could close an idle stream of the
+same main connection.  Since the new stream was not in the tree yet,
+that close found no remaining streams and marked the main connection
+reusable again.  Once reusable, the connection could later be drained
+while processing one of its streams, for example when connecting to an
+upstream, freeing it while still in use.
+
+Fix is to insert the new stream into the tree before calling
+ngx_get_connection(), so the main connection is not considered idle.
+
+Reported by Xint.io.
+
+(cherry picked from commit c58d2a22d12350766185c94f2245bf4be5bcfb7d)
+CVE: CVE-2026-121810
+Upstream-Status: Backport [https://github.com/nginx/nginx/commit/c58d2a22d12350766185c94f2245bf4be5bcfb7d]
+
+Signed-off-by: Patrick Vogelaar <[email protected]>
+---
+ src/event/quic/ngx_event_quic_streams.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/event/quic/ngx_event_quic_streams.c b/src/event/quic/ngx_event_quic_streams.c
+index a9a21f578..7fe044750 100644
+--- a/src/event/quic/ngx_event_quic_streams.c
++++ b/src/event/quic/ngx_event_quic_streams.c
+@@ -731,12 +731,15 @@ ngx_quic_create_stream(ngx_connection_t *c, uint64_t id)
+         addr_text.data = NULL;
+     }
+ 
++    ngx_rbtree_insert(&qc->streams.tree, &qs->node);
++
+     reusable = c->reusable;
+     ngx_reusable_connection(c, 0);
+ 
+     sc = ngx_get_connection(c->fd, log);
+     if (sc == NULL) {
+         ngx_destroy_pool(pool);
++        ngx_rbtree_delete(&qc->streams.tree, &qs->node);
+         ngx_queue_insert_tail(&qc->streams.free, &qs->queue);
+         ngx_reusable_connection(c, reusable);
+         return NULL;
+@@ -803,6 +806,7 @@ ngx_quic_create_stream(ngx_connection_t *c, uint64_t id)
+     if (cln == NULL) {
+         ngx_close_connection(sc);
+         ngx_destroy_pool(pool);
++        ngx_rbtree_delete(&qc->streams.tree, &qs->node);
+         ngx_queue_insert_tail(&qc->streams.free, &qs->queue);
+         ngx_reusable_connection(c, reusable);
+         return NULL;
+@@ -811,8 +815,6 @@ ngx_quic_create_stream(ngx_connection_t *c, uint64_t id)
+     cln->handler = ngx_quic_stream_cleanup_handler;
+     cln->data = sc;
+ 
+-    ngx_rbtree_insert(&qc->streams.tree, &qs->node);
+-
+     return qs;
+ }
+ 
+-- 
+2.43.0
+
meta-webserver/recipes-httpd/nginx/nginx_1.26.3.bb +1 -0
index 5d9fae672b..06c33d7846 100644
@@ -12,6 +12,7 @@ SRC_URI:append = " \
                   file://CVE-2026-123634-01.patch \
                   file://CVE-2026-123634-02.patch \
                   file://CVE-2026-123633.patch \
+                  file://CVE-2026-121810.patch \
                   "
 
 SRC_URI[sha256sum] = "69ee2b237744036e61d24b836668aad3040dda461fe6f570f1787eab570c75aa"
Signature · 1 line
2.43.0
#5 lore raw

PATCH 5/5 nginx: fix for CVE-2026-113425

In reply to Patrick Vogelaar

Pick patch [0], [1], [2], [3] and [4] as mentioned in [5].

[0] https://github.com/nginx/nginx/commit/9e811a43119ac902f0d0296fb4afb34bb063cf1b
[1] https://github.com/nginx/nginx/commit/df9d8d940ecb83a50b1e55ccc296d0a29cfe774c
[2] https://github.com/nginx/nginx/commit/e2d23d45fa93ed236a9cdedcb54271e0a064c4f3
[3] https://github.com/nginx/nginx/commit/5deda780a9d5d1bcd5c6731d3118fa090ae900cc
[4] https://github.com/nginx/nginx/commit/4c5ace9f1d5419334a2e6772a0885ee7ed3d6e91
[5] https://security-tracker.debian.org/tracker/CVE-2026-113425

---
 .../nginx/nginx-1.26.3/CVE-2026-113425-01.patch    |  94 +++++++++++++++++
 .../nginx/nginx-1.26.3/CVE-2026-113425-02.patch    |  44 ++++++++
 .../nginx/nginx-1.26.3/CVE-2026-113425-03.patch    |  87 ++++++++++++++++
 .../nginx/nginx-1.26.3/CVE-2026-113425-04.patch    |  72 +++++++++++++
 .../nginx/nginx-1.26.3/CVE-2026-113425-05.patch    | 116 +++++++++++++++++++++
 meta-webserver/recipes-httpd/nginx/nginx_1.26.3.bb |   5 +
 6 files changed, 418 insertions(+)
meta-webserver/recipes-httpd/nginx/nginx-1.26.3/CVE-2026-113425-01.patch new file +94 -0
new file mode 100644
index 0000000000..17bf039918
@@ -0,0 +1,94 @@
+From cb07812b72e5f90a159a0e81e4669a115e8a2c2c Mon Sep 17 00:00:00 2001
+From: Maxim Dounin <[email protected]>
+Date: Sat, 20 Jun 2026 05:04:41 +0300
+Subject: [PATCH 06/10] Mail: updated ngx_mail_send() to set handlers on
+ s->quit.
+
+Most notably, this fixes potential issues when a fatal error message is
+sent with ngx_mail_send() with s->quit set, but the read handler is not
+updated.  Despite s->quit, ngx_mail_send() might not be able to send the
+error message immediately, and the read handler might be called on read
+events.  In particular, in ngx_mail_auth_http_block_read() and in
+ngx_mail_proxy_block_read() this could potentially cause accesses to
+freed memory or already closed connections in ngx_handle_read_event()
+error handling code paths.
+
+Reported by Evan Hellman,
+https://github.com/freenginx/nginx/issues/23
+https://github.com/freenginx/nginx/issues/24
+
+Signed-off-by: Vadim Zhestikov <[email protected]>
+Origin: <https://freenginx.org/hg/nginx/rev/87725983f346>
+
+(cherry picked from commit 9e811a43119ac902f0d0296fb4afb34bb063cf1b)
+CVE:CVE-2026-113425
+Upstream-Status: Backport [https://github.com/nginx/nginx/commit/9e811a43119ac902f0d0296fb4afb34bb063cf1b]
+
+Signed-off-by: Patrick Vogelaar <[email protected]>
+---
+ src/mail/ngx_mail_handler.c | 21 +++++++++++++++++----
+ 1 file changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c
+index 1167df3fb..5a8b59446 100644
+--- a/src/mail/ngx_mail_handler.c
++++ b/src/mail/ngx_mail_handler.c
+@@ -14,6 +14,7 @@
+ static void ngx_mail_proxy_protocol_handler(ngx_event_t *rev);
+ static void ngx_mail_init_session_handler(ngx_event_t *rev);
+ static void ngx_mail_init_session(ngx_connection_t *c);
++static void ngx_mail_block_read(ngx_event_t *rev);
+ 
+ #if (NGX_MAIL_SSL)
+ static void ngx_mail_ssl_init_connection(ngx_ssl_t *ssl, ngx_connection_t *c);
+@@ -415,8 +416,6 @@ ngx_mail_verify_cert(ngx_mail_session_t *s, ngx_connection_t *c)
+         s->out = cscf->protocol->cert_error;
+         s->quit = 1;
+ 
+-        c->write->handler = ngx_mail_send;
+-
+         ngx_mail_send(s->connection->write);
+         return NGX_ERROR;
+     }
+@@ -436,8 +435,6 @@ ngx_mail_verify_cert(ngx_mail_session_t *s, ngx_connection_t *c)
+             s->out = cscf->protocol->no_cert;
+             s->quit = 1;
+ 
+-            c->write->handler = ngx_mail_send;
+-
+             ngx_mail_send(s->connection->write);
+             return NGX_ERROR;
+         }
+@@ -818,6 +815,11 @@ again:
+ 
+     ngx_add_timer(c->write, cscf->timeout);
+ 
++    if (s->quit) {
++        c->read->handler = ngx_mail_block_read;
++        c->write->handler = ngx_mail_send;
++    }
++
+     if (ngx_handle_write_event(c->write, 0) != NGX_OK) {
+         ngx_mail_close_connection(c);
+         return;
+@@ -936,6 +938,17 @@ ngx_mail_session_internal_server_error(ngx_mail_session_t *s)
+ }
+ 
+ 
++static void
++ngx_mail_block_read(ngx_event_t *rev)
++{
++    ngx_log_debug0(NGX_LOG_DEBUG_MAIL, rev->log, 0, "mail block read");
++
++    if (ngx_handle_read_event(rev, 0) != NGX_OK) {
++        ngx_mail_close_connection(rev->data);
++    }
++}
++
++
+ void
+ ngx_mail_close_connection(ngx_connection_t *c)
+ {
+-- 
+2.43.0
+
meta-webserver/recipes-httpd/nginx/nginx-1.26.3/CVE-2026-113425-02.patch new file +44 -0

44 lines not on this page · raw message

meta-webserver/recipes-httpd/nginx/nginx-1.26.3/CVE-2026-113425-03.patch new file +87 -0

87 lines not on this page · raw message

meta-webserver/recipes-httpd/nginx/nginx-1.26.3/CVE-2026-113425-04.patch new file +72 -0

72 lines not on this page · raw message

meta-webserver/recipes-httpd/nginx/nginx-1.26.3/CVE-2026-113425-05.patch new file +116 -0

116 lines not on this page · raw message

meta-webserver/recipes-httpd/nginx/nginx_1.26.3.bb +5 -0
index 06c33d7846..856bc87492 100644
@@ -13,6 +13,11 @@ SRC_URI:append = " \
                   file://CVE-2026-123634-02.patch \
                   file://CVE-2026-123633.patch \
                   file://CVE-2026-121810.patch \
+                  file://CVE-2026-113425-01.patch \
+                  file://CVE-2026-113425-02.patch \
+                  file://CVE-2026-113425-03.patch \
+                  file://CVE-2026-113425-04.patch \
+                  file://CVE-2026-113425-05.patch \
                   "
 
 SRC_URI[sha256sum] = "69ee2b237744036e61d24b836668aad3040dda461fe6f570f1787eab570c75aa"
Signature · 1 line
2.43.0