Version in base suite: 1.26.3-3+deb13u7 Version in overlay suite: 1.26.3-3+deb13u10 Base version: nginx_1.26.3-3+deb13u10 Target version: nginx_1.26.3-3+deb13u11 Base file: /srv/ftp-master.debian.org/ftp/pool/main/n/nginx/nginx_1.26.3-3+deb13u10.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/n/nginx/nginx_1.26.3-3+deb13u11.dsc changelog | 24 +++ patches/CVE-2026-113425.patch | 276 ++++++++++++++++++++++++++++++++++++++++++ patches/CVE-2026-118899.patch | 62 +++++++++ patches/CVE-2026-120967.patch | 35 +++++ patches/CVE-2026-121810.patch | 61 +++++++++ patches/CVE-2026-123007.patch | 164 ++++++++++++++++++++++++ patches/CVE-2026-123633.patch | 42 ++++++ patches/CVE-2026-123634.patch | 171 ++++++++++++++++++++++++++ patches/CVE-2026-123640.patch | 145 ++++++++++++++++++++++ patches/CVE-2026-125283.patch | 32 ++++ patches/series | 9 + 11 files changed, 1021 insertions(+) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp2mxi8img/nginx_1.26.3-3+deb13u10.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp2mxi8img/nginx_1.26.3-3+deb13u11.dsc: no acceptable signature found diff -Nru nginx-1.26.3/debian/changelog nginx-1.26.3/debian/changelog --- nginx-1.26.3/debian/changelog 2026-10-15 01:08:48.000000000 +0000 +++ nginx-1.26.3/debian/changelog 2026-11-18 17:29:52.000000000 +0000 @@ -1,3 +1,27 @@ +nginx (1.26.3-3+deb13u11) trixie-security; urgency=high + + * Backport security fixes from upstream 1.30.7: + - d/p/CVE-2026-123633.patch: keep HTTP/2 connections with active streams + out of the reusable connection queue. + - d/p/CVE-2026-123640.patch: validate ClientHello extensions in + ngx_stream_ssl_preread_module. + - d/p/CVE-2026-120967.patch: verify stream client certificates using + the server configuration selected by SNI. + - d/p/CVE-2026-118899.patch: handle NGX_AGAIN explicitly while reading + HTTP request bodies. + - d/p/CVE-2026-123634.patch: defer freeing detached resolver contexts + until their callbacks run. + - d/p/CVE-2026-123007.patch: include queued DATA in HTTP/2 flow control + checks, preserving nginx-dev ABI compatibility. + - d/p/CVE-2026-113425.patch: prevent mail sessions from being freed + while authentication, upstream setup or SMTP resolution is pending. + - d/p/CVE-2026-121810.patch: keep a QUIC connection active while + allocating a connection slot for a new stream. + - d/p/CVE-2026-125283.patch: use the actual script output length when + stripping an alias prefix in try_files. + + -- Jan Mojžíš Wed, 18 Nov 2026 17:29:52 +0000 + nginx (1.26.3-3+deb13u10) trixie-security; urgency=high * Backport security fixes from upstream 1.30.6: diff -Nru nginx-1.26.3/debian/patches/CVE-2026-113425.patch nginx-1.26.3/debian/patches/CVE-2026-113425.patch --- nginx-1.26.3/debian/patches/CVE-2026-113425.patch 1970-01-01 00:00:00.000000000 +0000 +++ nginx-1.26.3/debian/patches/CVE-2026-113425.patch 2026-11-18 17:29:52.000000000 +0000 @@ -0,0 +1,276 @@ +Origin: upstream, https://github.com/nginx/nginx/commit/df9d8d940ecb83a50b1e55ccc296d0a29cfe774c +From f578b35cf6b6d319c41fe10dafa1128a6f7e8485 Mon Sep 17 00:00:00 2001 +From: Vadim Zhestikov +Date: Wed, 4 Nov 2026 09:54:11 -0800 +Subject: [PATCH] Mail: keep sessions alive while asynchronous operations are + pending (CVE-2026-113425) + +Keep the mail session alive while client and upstream operations +are pending. + +Debian change: + Combine five upstream commits covering fatal replies, auth_http, + upstream connection setup and SMTP name resolution. + +Additional upstream commits: + https://github.com/nginx/nginx/commit/9e811a43119ac902f0d0296fb4afb34bb063cf1b + https://github.com/nginx/nginx/commit/e2d23d45fa93ed236a9cdedcb54271e0a064c4f3 + https://github.com/nginx/nginx/commit/5deda780a9d5d1bcd5c6731d3118fa090ae900cc + https://github.com/nginx/nginx/commit/4c5ace9f1d5419334a2e6772a0885ee7ed3d6e91 +--- + src/mail/ngx_mail_auth_http_module.c | 29 +++++++++++++++++++++ + src/mail/ngx_mail_handler.c | 21 ++++++++++++--- + src/mail/ngx_mail_proxy_module.c | 19 ++++++++++++++ + src/mail/ngx_mail_smtp_handler.c | 38 ++++++++++++++++++++++++++++ + 4 files changed, 103 insertions(+), 4 deletions(-) + +diff --git a/src/mail/ngx_mail_auth_http_module.c b/src/mail/ngx_mail_auth_http_module.c +index d931183..833b36c 100644 +--- a/src/mail/ngx_mail_auth_http_module.c ++++ b/src/mail/ngx_mail_auth_http_module.c +@@ -70,6 +70,7 @@ static void ngx_mail_auth_sleep_handler(ngx_event_t *rev); + static ngx_int_t ngx_mail_auth_http_parse_header_line(ngx_mail_session_t *s, + ngx_mail_auth_http_ctx_t *ctx); + static void ngx_mail_auth_http_block_read(ngx_event_t *rev); ++static void ngx_mail_auth_http_block_write(ngx_event_t *wev); + static void ngx_mail_auth_http_dummy_handler(ngx_event_t *ev); + static ngx_buf_t *ngx_mail_auth_http_create_request(ngx_mail_session_t *s, + ngx_pool_t *pool, ngx_mail_auth_http_conf_t *ahcf); +@@ -216,7 +217,10 @@ ngx_mail_auth_http_init(ngx_mail_session_t *s) + ctx->peer.connection->data = s; + ctx->peer.connection->pool = s->connection->pool; + ++ s->out.len = 0; ++ + s->connection->read->handler = ngx_mail_auth_http_block_read; ++ s->connection->write->handler = ngx_mail_auth_http_block_write; + ctx->peer.connection->read->handler = ngx_mail_auth_http_read_handler; + ctx->peer.connection->write->handler = ngx_mail_auth_http_write_handler; + +@@ -688,6 +692,8 @@ ngx_mail_auth_http_process_headers(ngx_mail_session_t *s, + + ngx_close_connection(ctx->peer.connection); + ++ s->connection->write->handler = ngx_mail_send; ++ + if (ctx->err.len) { + + ngx_log_error(NGX_LOG_INFO, s->connection->log, 0, +@@ -1120,6 +1126,29 @@ ngx_mail_auth_http_block_read(ngx_event_t *rev) + } + + ++static void ++ngx_mail_auth_http_block_write(ngx_event_t *wev) ++{ ++ ngx_connection_t *c; ++ ngx_mail_session_t *s; ++ ngx_mail_auth_http_ctx_t *ctx; ++ ++ ngx_log_debug0(NGX_LOG_DEBUG_MAIL, wev->log, 0, ++ "mail auth http block write"); ++ ++ if (ngx_handle_write_event(wev, 0) != NGX_OK) { ++ c = wev->data; ++ s = c->data; ++ ++ ctx = ngx_mail_get_module_ctx(s, ngx_mail_auth_http_module); ++ ++ ngx_close_connection(ctx->peer.connection); ++ ngx_destroy_pool(ctx->pool); ++ ngx_mail_session_internal_server_error(s); ++ } ++} ++ ++ + static void + ngx_mail_auth_http_dummy_handler(ngx_event_t *ev) + { +diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c +index d3be7f3..ac050a9 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; + } +@@ -824,6 +821,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; +@@ -942,6 +944,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) + { +diff --git a/src/mail/ngx_mail_proxy_module.c b/src/mail/ngx_mail_proxy_module.c +index efed9ab..de09f2a 100644 +--- a/src/mail/ngx_mail_proxy_module.c ++++ b/src/mail/ngx_mail_proxy_module.c +@@ -24,6 +24,7 @@ typedef struct { + + + static void ngx_mail_proxy_block_read(ngx_event_t *rev); ++static void ngx_mail_proxy_block_write(ngx_event_t *wev); + static void ngx_mail_proxy_pop3_handler(ngx_event_t *rev); + static void ngx_mail_proxy_imap_handler(ngx_event_t *rev); + static void ngx_mail_proxy_smtp_handler(ngx_event_t *rev); +@@ -165,6 +166,7 @@ ngx_mail_proxy_init(ngx_mail_session_t *s, ngx_addr_t *peer) + p->upstream.connection->pool = s->connection->pool; + + s->connection->read->handler = ngx_mail_proxy_block_read; ++ s->connection->write->handler = ngx_mail_proxy_block_write; + p->upstream.connection->write->handler = ngx_mail_proxy_write_handler; + + pcf = ngx_mail_get_module_srv_conf(s, ngx_mail_proxy_module); +@@ -223,6 +225,23 @@ ngx_mail_proxy_block_read(ngx_event_t *rev) + } + + ++static void ++ngx_mail_proxy_block_write(ngx_event_t *wev) ++{ ++ ngx_connection_t *c; ++ ngx_mail_session_t *s; ++ ++ ngx_log_debug0(NGX_LOG_DEBUG_MAIL, wev->log, 0, "mail proxy block write"); ++ ++ if (ngx_handle_write_event(wev, 0) != NGX_OK) { ++ c = wev->data; ++ s = c->data; ++ ++ ngx_mail_proxy_close_session(s); ++ } ++} ++ ++ + static void + ngx_mail_proxy_pop3_handler(ngx_event_t *rev) + { +diff --git a/src/mail/ngx_mail_smtp_handler.c b/src/mail/ngx_mail_smtp_handler.c +index e477741..a956e0a 100644 +--- a/src/mail/ngx_mail_smtp_handler.c ++++ b/src/mail/ngx_mail_smtp_handler.c +@@ -17,6 +17,7 @@ static ngx_int_t ngx_mail_smtp_validate_host(ngx_str_t *name); + static void ngx_mail_smtp_resolve_name(ngx_event_t *rev); + static void ngx_mail_smtp_resolve_name_handler(ngx_resolver_ctx_t *ctx); + static void ngx_mail_smtp_block_reading(ngx_event_t *rev); ++static void ngx_mail_smtp_block_writing(ngx_event_t *wev); + static void ngx_mail_smtp_greeting(ngx_mail_session_t *s, ngx_connection_t *c); + static void ngx_mail_smtp_invalid_pipelining(ngx_event_t *rev); + static ngx_int_t ngx_mail_smtp_create_buffer(ngx_mail_session_t *s, +@@ -92,6 +93,7 @@ ngx_mail_smtp_init_session(ngx_mail_session_t *s, ngx_connection_t *c) + + s->resolver_ctx = ctx; + c->read->handler = ngx_mail_smtp_block_reading; ++ c->write->handler = ngx_mail_smtp_block_writing; + + if (ngx_resolve_addr(ctx) != NGX_OK) { + ngx_mail_close_connection(c); +@@ -159,6 +161,7 @@ ngx_mail_smtp_resolve_addr_handler(ngx_resolver_ctx_t *ctx) + "address resolved: %V", &s->host); + + c->read->handler = ngx_mail_smtp_resolve_name; ++ c->write->handler = ngx_mail_send; + + ngx_post_event(c->read, &ngx_posted_events); + } +@@ -220,6 +223,7 @@ ngx_mail_smtp_resolve_name(ngx_event_t *rev) + + s->resolver_ctx = ctx; + c->read->handler = ngx_mail_smtp_block_reading; ++ c->write->handler = ngx_mail_smtp_block_writing; + + if (ngx_resolve_name(ctx) != NGX_OK) { + ngx_mail_close_connection(c); +@@ -322,6 +326,38 @@ ngx_mail_smtp_block_reading(ngx_event_t *rev) + } + + ++static void ++ngx_mail_smtp_block_writing(ngx_event_t *wev) ++{ ++ ngx_connection_t *c; ++ ngx_mail_session_t *s; ++ ngx_resolver_ctx_t *ctx; ++ ++ c = wev->data; ++ s = c->data; ++ ++ ngx_log_debug0(NGX_LOG_DEBUG_MAIL, c->log, 0, "smtp writing blocked"); ++ ++ if (ngx_handle_write_event(wev, 0) != NGX_OK) { ++ ++ if (s->resolver_ctx) { ++ ctx = s->resolver_ctx; ++ ++ if (ctx->handler == ngx_mail_smtp_resolve_addr_handler) { ++ ngx_resolve_addr_done(ctx); ++ ++ } else if (ctx->handler == ngx_mail_smtp_resolve_name_handler) { ++ ngx_resolve_name_done(ctx); ++ } ++ ++ s->resolver_ctx = NULL; ++ } ++ ++ ngx_mail_close_connection(c); ++ } ++} ++ ++ + static void + ngx_mail_smtp_greeting(ngx_mail_session_t *s, ngx_connection_t *c) + { +@@ -346,6 +382,8 @@ ngx_mail_smtp_greeting(ngx_mail_session_t *s, ngx_connection_t *c) + ngx_post_event(c->read, &ngx_posted_events); + } + ++ c->write->handler = ngx_mail_send; ++ + if (sscf->greeting_delay) { + c->read->handler = ngx_mail_smtp_invalid_pipelining; + return; diff -Nru nginx-1.26.3/debian/patches/CVE-2026-118899.patch nginx-1.26.3/debian/patches/CVE-2026-118899.patch --- nginx-1.26.3/debian/patches/CVE-2026-118899.patch 1970-01-01 00:00:00.000000000 +0000 +++ nginx-1.26.3/debian/patches/CVE-2026-118899.patch 2026-11-18 17:29:52.000000000 +0000 @@ -0,0 +1,62 @@ +Origin: upstream, https://github.com/nginx/nginx/commit/1b723277aa556ba4c6e40cc8f0f0b465e29c0a13 +From 5a2b301c41e9cb6fa01f8645df6688d548ca94ae Mon Sep 17 00:00:00 2001 +From: Maxim Dounin +Date: Sat, 30 Mar 2024 05:06:59 +0300 +Subject: [PATCH] Handle NGX_AGAIN explicitly when reading request bodies + (CVE-2026-118899) + +Stop reading when the transport asks to retry, even if the read event +is still marked ready. + +Debian change: + Combine the request-body NGX_AGAIN fix with its HTTP/3 follow-up. + +Additional upstream commits: + https://github.com/nginx/nginx/commit/d1640655f46c5a2d32fefc2c818583f203e47536 +--- + src/http/ngx_http_request_body.c | 3 ++- + src/http/v3/ngx_http_v3_request.c | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c +index afb0423..cd21f74 100644 +--- a/src/http/ngx_http_request_body.c ++++ b/src/http/ngx_http_request_body.c +@@ -307,6 +307,7 @@ ngx_http_do_read_client_request_body(ngx_http_request_t *r) + c = r->connection; + rb = r->request_body; + flush = 1; ++ n = NGX_AGAIN; + + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, + "http read client request body"); +@@ -432,7 +433,7 @@ ngx_http_do_read_client_request_body(ngx_http_request_t *r) + break; + } + +- if (!c->read->ready || rb->rest == 0) { ++ if (n == NGX_AGAIN || !c->read->ready || rb->rest == 0) { + + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + ngx_add_timer(c->read, clcf->client_body_timeout); +diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c +index a3e10ae..ac8b57b 100644 +--- a/src/http/v3/ngx_http_v3_request.c ++++ b/src/http/v3/ngx_http_v3_request.c +@@ -1351,6 +1351,7 @@ ngx_http_v3_do_read_client_request_body(ngx_http_request_t *r) + c = r->connection; + rb = r->request_body; + flush = 1; ++ n = NGX_AGAIN; + + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, + "http3 read client request body"); +@@ -1474,7 +1475,7 @@ ngx_http_v3_do_read_client_request_body(ngx_http_request_t *r) + break; + } + +- if (!c->read->ready || rb->rest == 0) { ++ if (n == NGX_AGAIN || !c->read->ready || rb->rest == 0) { + + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + ngx_add_timer(c->read, clcf->client_body_timeout); diff -Nru nginx-1.26.3/debian/patches/CVE-2026-120967.patch nginx-1.26.3/debian/patches/CVE-2026-120967.patch --- nginx-1.26.3/debian/patches/CVE-2026-120967.patch 1970-01-01 00:00:00.000000000 +0000 +++ nginx-1.26.3/debian/patches/CVE-2026-120967.patch 2026-11-18 17:29:52.000000000 +0000 @@ -0,0 +1,35 @@ +Origin: upstream, https://github.com/nginx/nginx/commit/77f90f1c0cbf79145e5667b7e171f8766ccb6765 +From 77f90f1c0cbf79145e5667b7e171f8766ccb6765 Mon Sep 17 00:00:00 2001 +From: Vadim Zhestikov +Date: Wed, 14 Oct 2026 10:48:06 -0700 +Subject: [PATCH] Stream: client SSL certificates were not checked with SNI + +If the SSL handshake completed in the first call of +ngx_stream_ssl_handler(), the client certificate was verified using the +configuration of the default server, rather than the virtual server +selected by SNI during the handshake. + +The problem appeared in d21675228 (1.25.5). It is similar to the one +fixed in 620c9a4c4. + +The fix is to re-read the server configuration before verifying the +client certificate. + +Reported by CERT.PL. +--- + src/stream/ngx_stream_ssl_module.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/stream/ngx_stream_ssl_module.c b/src/stream/ngx_stream_ssl_module.c +index 0e17cff..12e2d34 100644 +--- a/src/stream/ngx_stream_ssl_module.c ++++ b/src/stream/ngx_stream_ssl_module.c +@@ -459,6 +459,8 @@ ngx_stream_ssl_handler(ngx_stream_session_t *s) + } + } + ++ sscf = ngx_stream_get_module_srv_conf(s, ngx_stream_ssl_module); ++ + if (sscf->verify) { + rc = SSL_get_verify_result(c->ssl->connection); + diff -Nru nginx-1.26.3/debian/patches/CVE-2026-121810.patch nginx-1.26.3/debian/patches/CVE-2026-121810.patch --- nginx-1.26.3/debian/patches/CVE-2026-121810.patch 1970-01-01 00:00:00.000000000 +0000 +++ nginx-1.26.3/debian/patches/CVE-2026-121810.patch 2026-11-18 17:29:52.000000000 +0000 @@ -0,0 +1,61 @@ +Origin: upstream, https://github.com/nginx/nginx/commit/c58d2a22d12350766185c94f2245bf4be5bcfb7d +From c58d2a22d12350766185c94f2245bf4be5bcfb7d Mon Sep 17 00:00:00 2001 +From: Roman Arutyunyan +Date: Sun, 1 Nov 2026 16:46:22 +0400 +Subject: [PATCH] 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. +--- + 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 18fffea..7237846 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; + } + diff -Nru nginx-1.26.3/debian/patches/CVE-2026-123007.patch nginx-1.26.3/debian/patches/CVE-2026-123007.patch --- nginx-1.26.3/debian/patches/CVE-2026-123007.patch 1970-01-01 00:00:00.000000000 +0000 +++ nginx-1.26.3/debian/patches/CVE-2026-123007.patch 2026-11-18 17:29:52.000000000 +0000 @@ -0,0 +1,164 @@ +Origin: upstream, https://github.com/nginx/nginx/commit/b89c4100bf6762a45e4a6463eaf4b70368277c94 +From 23f1ecd6744737af07ea52fe47a44a48a48b0014 Mon Sep 17 00:00:00 2001 +From: Roman Arutyunyan +Date: Thu, 29 Oct 2026 21:37:05 +0400 +Subject: [PATCH] HTTP/2: account for queued DATA in connection flow control + (CVE-2026-123007) + +Validate WINDOW_UPDATE against the available send window plus the +queued DATA payload. + +Debian backport note: + Store the queued byte count in a private connection allocation that + embeds ngx_http_v2_connection_t as its first member. The counter has + the lifetime of the connection, and the exported header and structure + layout stay compatible with existing nginx-dev modules. +--- + src/http/v2/ngx_http_v2.c | 33 +++++++++++++++---------- + src/http/v2/ngx_http_v2_connection.hh | 19 ++++++++++++++ + src/http/v2/ngx_http_v2_filter_module.c | 4 +++ + 3 files changed, 43 insertions(+), 13 deletions(-) + create mode 100644 src/http/v2/ngx_http_v2_connection.hh + +diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c +index 8092fc0..c2a48a0 100644 +--- a/src/http/v2/ngx_http_v2.c ++++ b/src/http/v2/ngx_http_v2.c +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -203,14 +204,15 @@ static ngx_http_v2_handler_pt ngx_http_v2_frame_states[] = { + void + ngx_http_v2_init(ngx_event_t *rev) + { +- u_char *p, *end; +- ngx_connection_t *c; +- ngx_pool_cleanup_t *cln; +- ngx_http_connection_t *hc; +- ngx_http_v2_srv_conf_t *h2scf; +- ngx_http_v2_main_conf_t *h2mcf; +- ngx_http_v2_connection_t *h2c; +- ngx_http_core_srv_conf_t *cscf; ++ u_char *p, *end; ++ ngx_connection_t *c; ++ ngx_pool_cleanup_t *cln; ++ ngx_http_connection_t *hc; ++ ngx_http_v2_srv_conf_t *h2scf; ++ ngx_http_v2_main_conf_t *h2mcf; ++ ngx_http_v2_connection_t *h2c; ++ ngx_http_core_srv_conf_t *cscf; ++ ngx_http_v2_connection_private_t *h2p; + + c = rev->data; + hc = c->data; +@@ -230,12 +232,14 @@ ngx_http_v2_init(ngx_event_t *rev) + } + } + +- h2c = ngx_pcalloc(c->pool, sizeof(ngx_http_v2_connection_t)); +- if (h2c == NULL) { ++ h2p = ngx_pcalloc(c->pool, sizeof(ngx_http_v2_connection_private_t)); ++ if (h2p == NULL) { + ngx_http_close_connection(c); + return; + } + ++ h2c = &h2p->connection; ++ + h2c->connection = c; + h2c->http_connection = hc; + +@@ -2395,7 +2399,7 @@ static u_char * + ngx_http_v2_state_window_update(ngx_http_v2_connection_t *h2c, u_char *pos, + u_char *end) + { +- size_t window; ++ size_t window, send_window; + ngx_event_t *wev; + ngx_queue_t *q; + ngx_http_v2_node_t *node; +@@ -2480,13 +2484,16 @@ 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) { ++ send_window = h2c->send_window ++ + ngx_http_v2_connection_private(h2c)->send_queued; ++ ++ if (window > NGX_HTTP_V2_MAX_WINDOW - send_window) { + 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, send_window); + + return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_FLOW_CTRL_ERROR); + } +diff --git a/src/http/v2/ngx_http_v2_connection.hh b/src/http/v2/ngx_http_v2_connection.hh +new file mode 100644 +index 0000000..7bd2940 +--- /dev/null ++++ b/src/http/v2/ngx_http_v2_connection.hh +@@ -0,0 +1,19 @@ ++#ifndef _NGX_HTTP_V2_CONNECTION_HH_INCLUDED_ ++#define _NGX_HTTP_V2_CONNECTION_HH_INCLUDED_ ++ ++ ++typedef struct { ++ ngx_http_v2_connection_t connection; ++ size_t send_queued; ++} ngx_http_v2_connection_private_t; ++ ++ ++static ngx_inline ngx_http_v2_connection_private_t * ++ngx_http_v2_connection_private(ngx_http_v2_connection_t *h2c) ++{ ++ /* The public connection is the first member of the private allocation. */ ++ return (ngx_http_v2_connection_private_t *) h2c; ++} ++ ++ ++#endif /* _NGX_HTTP_V2_CONNECTION_HH_INCLUDED_ */ +diff --git a/src/http/v2/ngx_http_v2_filter_module.c b/src/http/v2/ngx_http_v2_filter_module.c +index 1e2cafa..4c8c5a5 100644 +--- a/src/http/v2/ngx_http_v2_filter_module.c ++++ b/src/http/v2/ngx_http_v2_filter_module.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + #include + + +@@ -1028,6 +1029,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; ++ ngx_http_v2_connection_private(h2c)->send_queued += frame_size; + + stream->send_window -= frame_size; + stream->queued++; +@@ -1423,6 +1425,7 @@ done: + stream->request->header_size += NGX_HTTP_V2_FRAME_HEADER_SIZE; + + h2c->payload_bytes += frame->length; ++ ngx_http_v2_connection_private(h2c)->send_queued -= frame->length; + + ngx_http_v2_handle_frame(stream, frame); + +@@ -1557,6 +1560,7 @@ ngx_http_v2_filter_cleanup(void *data) + } + + h2c->send_window += window; ++ ngx_http_v2_connection_private(h2c)->send_queued -= window; + } + + diff -Nru nginx-1.26.3/debian/patches/CVE-2026-123633.patch nginx-1.26.3/debian/patches/CVE-2026-123633.patch --- nginx-1.26.3/debian/patches/CVE-2026-123633.patch 1970-01-01 00:00:00.000000000 +0000 +++ nginx-1.26.3/debian/patches/CVE-2026-123633.patch 2026-11-18 17:29:52.000000000 +0000 @@ -0,0 +1,42 @@ +Origin: upstream, https://github.com/nginx/nginx/commit/0c87dd1db413e440a4e3ef7ee8acc518509e8809 +From 0c87dd1db413e440a4e3ef7ee8acc518509e8809 Mon Sep 17 00:00:00 2001 +From: Roman Arutyunyan +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. +--- + 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 bea5c88..e0e7ef3 100644 +--- a/src/http/v2/ngx_http_v2.c ++++ b/src/http/v2/ngx_http_v2.c +@@ -3109,6 +3109,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) { diff -Nru nginx-1.26.3/debian/patches/CVE-2026-123634.patch nginx-1.26.3/debian/patches/CVE-2026-123634.patch --- nginx-1.26.3/debian/patches/CVE-2026-123634.patch 1970-01-01 00:00:00.000000000 +0000 +++ nginx-1.26.3/debian/patches/CVE-2026-123634.patch 2026-11-18 17:29:52.000000000 +0000 @@ -0,0 +1,171 @@ +Origin: upstream, https://github.com/nginx/nginx/commit/7426c29f140c330dd6c6cdfeb2943be1978c69e0 +From ddd1ea72aaccd75d3fa12a004143b3f204ef5e38 Mon Sep 17 00:00:00 2001 +From: Roman Arutyunyan +Date: Wed, 28 Oct 2026 21:51:48 +0400 +Subject: [PATCH] Resolver: defer freeing detached contexts until their + callback runs (CVE-2026-123634) + +Keep finalized contexts alive until the resolver finishes reporting the +results. + +Debian change: + Combine the CNAME restart error-handling prerequisite with the fix + for finalizing detached resolver contexts. + +Additional upstream commits: + https://github.com/nginx/nginx/commit/338f6231e347c17a07c381802b1bc3c20c55b529 +--- + src/core/ngx_resolver.c | 71 ++++++++++++++++++++++++++++++++++++----- + 1 file changed, 63 insertions(+), 8 deletions(-) + +diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c +index c76c178..c3467cf 100644 +--- a/src/core/ngx_resolver.c ++++ b/src/core/ngx_resolver.c +@@ -106,6 +106,7 @@ static ngx_int_t ngx_resolver_copy(ngx_resolver_t *r, ngx_str_t *name, + static ngx_int_t ngx_resolver_set_timeout(ngx_resolver_t *r, + ngx_resolver_ctx_t *ctx); + static void ngx_resolver_timeout_handler(ngx_event_t *ev); ++static void ngx_resolver_free_handler(ngx_resolver_ctx_t *ctx); + static void ngx_resolver_free_node(ngx_resolver_t *r, ngx_resolver_node_t *rn); + static void *ngx_resolver_alloc(ngx_resolver_t *r, size_t size); + static void *ngx_resolver_calloc(ngx_resolver_t *r, size_t size); +@@ -570,9 +571,11 @@ ngx_resolve_name_done(ngx_resolver_ctx_t *ctx) + w = w->next; + } + +- ngx_log_error(NGX_LOG_ALERT, r->log, 0, +- "could not cancel %V resolving", &ctx->name); ++ ngx_log_debug1(NGX_LOG_DEBUG_CORE, r->log, 0, ++ "could not cancel %V resolving", &ctx->name); + } ++ ++ ctx->handler = ngx_resolver_free_handler; + } + + done: +@@ -590,9 +593,12 @@ done: + + if (ctx->event) { + ngx_resolver_free_locked(r, ctx->event); ++ ctx->event = NULL; + } + +- ngx_resolver_free_locked(r, ctx); ++ if (ctx->handler != ngx_resolver_free_handler) { ++ ngx_resolver_free_locked(r, ctx); ++ } + + /* unlock alloc mutex */ + +@@ -1202,6 +1208,7 @@ ngx_resolve_addr_done(ngx_resolver_ctx_t *ctx) + } + } + ++#if (NGX_DEBUG) + { + u_char text[NGX_SOCKADDR_STRLEN]; + ngx_str_t addrtext; +@@ -1210,9 +1217,12 @@ ngx_resolve_addr_done(ngx_resolver_ctx_t *ctx) + addrtext.len = ngx_sock_ntop(ctx->addr.sockaddr, ctx->addr.socklen, + text, NGX_SOCKADDR_STRLEN, 0); + +- ngx_log_error(NGX_LOG_ALERT, r->log, 0, +- "could not cancel %V resolving", &addrtext); ++ ngx_log_debug1(NGX_LOG_DEBUG_CORE, r->log, 0, ++ "could not cancel %V resolving", &addrtext); + } ++#endif ++ ++ ctx->handler = ngx_resolver_free_handler; + } + + done: +@@ -1225,9 +1235,12 @@ done: + + if (ctx->event) { + ngx_resolver_free_locked(r, ctx->event); ++ ctx->event = NULL; + } + +- ngx_resolver_free_locked(r, ctx); ++ if (ctx->handler != ngx_resolver_free_handler) { ++ ngx_resolver_free_locked(r, ctx); ++ } + + /* unlock alloc mutex */ + +@@ -2550,7 +2563,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 +2963,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 */ +@@ -2975,6 +3018,11 @@ ngx_resolver_resolve_srv_names(ngx_resolver_ctx_t *ctx, ngx_resolver_node_t *rn) + ngx_resolver_ctx_t *cctx; + ngx_resolver_srv_name_t *srvs; + ++ if (ctx->handler == ngx_resolver_free_handler) { ++ ctx->handler(ctx); ++ return; ++ } ++ + r = ctx->resolver; + + ctx->node = NULL; +@@ -4106,6 +4154,13 @@ ngx_resolver_timeout_handler(ngx_event_t *ev) + } + + ++static void ++ngx_resolver_free_handler(ngx_resolver_ctx_t *ctx) ++{ ++ ngx_resolver_free(ctx->resolver, ctx); ++} ++ ++ + static void + ngx_resolver_free_node(ngx_resolver_t *r, ngx_resolver_node_t *rn) + { diff -Nru nginx-1.26.3/debian/patches/CVE-2026-123640.patch nginx-1.26.3/debian/patches/CVE-2026-123640.patch --- nginx-1.26.3/debian/patches/CVE-2026-123640.patch 1970-01-01 00:00:00.000000000 +0000 +++ nginx-1.26.3/debian/patches/CVE-2026-123640.patch 2026-11-18 17:29:52.000000000 +0000 @@ -0,0 +1,145 @@ +Origin: upstream, https://github.com/nginx/nginx/commit/63d74d545295faa3d147ef704d740da4805f13f4 +From d2f92202d9502b4174139bdf39e7fc4db4c3d074 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Mon, 21 Sep 2026 09:57:19 -0700 +Subject: [PATCH] Stream ssl_preread: validate ClientHello extension lengths + and uniqueness (CVE-2026-123640) + +Validate the extension block and the lengths of parsed extensions. + +Debian change: + Combine the ClientHello length checks with the follow-up that rejects + duplicate SNI and ALPN extensions. + +Additional upstream commits: + https://github.com/nginx/nginx/commit/1e668b7e856198f89a2eec0b94b54b826eb5c4f7 +--- + src/stream/ngx_stream_ssl_preread_module.c | 58 +++++++++++++++++++--- + 1 file changed, 51 insertions(+), 7 deletions(-) + +diff --git a/src/stream/ngx_stream_ssl_preread_module.c b/src/stream/ngx_stream_ssl_preread_module.c +index bc96ade..4653392 100644 +--- a/src/stream/ngx_stream_ssl_preread_module.c ++++ b/src/stream/ngx_stream_ssl_preread_module.c +@@ -224,6 +224,7 @@ ngx_stream_ssl_preread_parse_record(ngx_stream_ssl_preread_ctx_t *ctx, + sw_cs, /* cipher_suites */ + sw_cm_len, /* compression_methods length */ + sw_cm, /* compression_methods */ ++ sw_ext_len, /* extensions length */ + sw_ext, /* extension */ + sw_ext_header, /* extension_type, extension_data length */ + sw_sni_len, /* SNI length */ +@@ -330,11 +331,20 @@ ngx_stream_ssl_preread_parse_record(ngx_stream_ssl_preread_ctx_t *ctx, + return NGX_OK; + } + +- state = sw_ext; ++ state = sw_ext_len; + dst = p; + size = 2; + break; + ++ case sw_ext_len: ++ if (left != (size_t) (p[0] << 8) + p[1]) { ++ ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0, ++ "ssl preread: extensions length error"); ++ return NGX_DECLINED; ++ } ++ ++ /* fall through */ ++ + case sw_ext: + if (left == 0) { + return NGX_OK; +@@ -346,16 +356,32 @@ ngx_stream_ssl_preread_parse_record(ngx_stream_ssl_preread_ctx_t *ctx, + break; + + case sw_ext_header: +- if (p[0] == 0 && p[1] == 0 && ctx->host.data == NULL) { ++ ext = (p[2] << 8) + p[3]; ++ ++ if (p[0] == 0 && p[1] == 0) { + /* SNI extension */ ++ ++ if (ctx->host.data != NULL) { ++ ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0, ++ "ssl preread: duplicate SNI"); ++ return NGX_DECLINED; ++ } ++ + state = sw_sni_len; + dst = p; + size = 2; + break; + } + +- if (p[0] == 0 && p[1] == 16 && ctx->alpn.data == NULL) { ++ if (p[0] == 0 && p[1] == 16) { + /* ALPN extension */ ++ ++ if (ctx->alpn.data != NULL) { ++ ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0, ++ "ssl preread: duplicate ALPN"); ++ return NGX_DECLINED; ++ } ++ + state = sw_alpn_len; + dst = p; + size = 2; +@@ -372,11 +398,17 @@ ngx_stream_ssl_preread_parse_record(ngx_stream_ssl_preread_ctx_t *ctx, + + state = sw_ext; + dst = NULL; +- size = (p[2] << 8) + p[3]; ++ size = ext; + break; + + case sw_sni_len: +- ext = (p[0] << 8) + p[1]; ++ if (ext < 5 || ext != 2 + (size_t) (p[0] << 8) + p[1]) { ++ ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0, ++ "ssl preread: SNI format error"); ++ return NGX_DECLINED; ++ } ++ ext -= 2; ++ + state = sw_sni_host_head; + dst = p; + size = 3; +@@ -416,7 +448,12 @@ ngx_stream_ssl_preread_parse_record(ngx_stream_ssl_preread_ctx_t *ctx, + break; + + case sw_alpn_len: +- ext = (p[0] << 8) + p[1]; ++ if (ext < 4 || ext != 2 + (size_t) (p[0] << 8) + p[1]) { ++ ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0, ++ "ssl preread: ALPN format error"); ++ return NGX_DECLINED; ++ } ++ ext -= 2; + + ctx->alpn.data = ngx_pnalloc(ctx->pool, ext); + if (ctx->alpn.data == NULL) { +@@ -469,6 +506,14 @@ ngx_stream_ssl_preread_parse_record(ngx_stream_ssl_preread_ctx_t *ctx, + break; + + case sw_supver_len: ++ size = p[0]; ++ ++ if (ext < 3 || ext != 1 + size) { ++ ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0, ++ "ssl preread: supported_versions format error"); ++ return NGX_DECLINED; ++ } ++ + ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0, + "ssl preread: supported_versions"); + +@@ -478,7 +523,6 @@ ngx_stream_ssl_preread_parse_record(ngx_stream_ssl_preread_ctx_t *ctx, + + state = sw_ext; + dst = NULL; +- size = p[0]; + break; + } + diff -Nru nginx-1.26.3/debian/patches/CVE-2026-125283.patch nginx-1.26.3/debian/patches/CVE-2026-125283.patch --- nginx-1.26.3/debian/patches/CVE-2026-125283.patch 1970-01-01 00:00:00.000000000 +0000 +++ nginx-1.26.3/debian/patches/CVE-2026-125283.patch 2026-11-18 17:29:52.000000000 +0000 @@ -0,0 +1,32 @@ +Origin: upstream, https://github.com/nginx/nginx/commit/b99b6b528b64e93354b5c3453e45701e70c461a8 +From b99b6b528b64e93354b5c3453e45701e70c461a8 Mon Sep 17 00:00:00 2001 +From: Roman Arutyunyan +Date: Thu, 5 Nov 2026 18:50:48 +0400 +Subject: [PATCH] Try files: fix uri formating in case of script underwrite + +Previously, if try_files was used with alias, and the script produced +a string smaller than the predicted size, then an integer underflow +could happen which resulted in buffer overrun. + +Fix is to recalculate the length after running the script. + +A similar length recalculation exists in ngx_http_index_module. +It was added by 25f920eca when fixing script overruns. + +Reported by Marc Luchian & Liviu-Alexandru Bud. +--- + src/http/modules/ngx_http_try_files_module.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/http/modules/ngx_http_try_files_module.c b/src/http/modules/ngx_http_try_files_module.c +index bbdab85..9092602 100644 +--- a/src/http/modules/ngx_http_try_files_module.c ++++ b/src/http/modules/ngx_http_try_files_module.c +@@ -186,6 +186,7 @@ ngx_http_try_files_handler(ngx_http_request_t *r) + return NGX_ERROR; + } + ++ len = e.pos - name + 1; + path.len = e.pos - path.data; + + *e.pos = '\0'; diff -Nru nginx-1.26.3/debian/patches/series nginx-1.26.3/debian/patches/series --- nginx-1.26.3/debian/patches/series 2026-10-15 01:08:48.000000000 +0000 +++ nginx-1.26.3/debian/patches/series 2026-11-18 17:29:52.000000000 +0000 @@ -27,3 +27,12 @@ CVE-2026-95101.patch CVE-2026-97629.patch CVE-2026-97205.patch +CVE-2026-123633.patch +CVE-2026-123640.patch +CVE-2026-120967.patch +CVE-2026-118899.patch +CVE-2026-123634.patch +CVE-2026-123007.patch +CVE-2026-113425.patch +CVE-2026-121810.patch +CVE-2026-125283.patch