nginx: fix CVE-2026-97205
PATCH 1/10 nginx: fix CVE-2026-97205
From: Hetvi Thakar <[email protected]>
This patch applies the upstream nginx stable backport for CVE-2026-97205. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2].
[1] https://github.com/nginx/nginx/commit/587c47aed19ddec799eee953a38837936e585b39
[2] https://ubuntu.com/security/CVE-2026-97205
--- .../nginx/files/CVE-2026-97205.patch | 153 ++++++++++++++++++ .../recipes-httpd/nginx/nginx_1.28.3.bb | 1 + .../recipes-httpd/nginx/nginx_1.29.7.bb | 1 + 3 files changed, 155 insertions(+) create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-97205.patch
meta-webserver/recipes-httpd/nginx/files/CVE-2026-97205.patch new file +153 -0
@@ -0,0 +1,153 @@ +From 587c47aed19ddec799eee953a38837936e585b39 Mon Sep 17 00:00:00 2001 +From: Vadim Zhestikov <[email protected]> +Date: Mon, 17 Aug 2026 09:19:46 -0700 +Subject: [PATCH] Limited the number of pending operations per request + +Each pending asynchronous operation holds a reference in +r->main->blocked, an 8-bit field, and the increments were not checked. +With 256 operations pending on a single request the counter wrapped to +zero, after which the request could be freed while those operations +still referenced its pool. This is the same overflow that 4ec67cf86 +addressed for r->main->count, and left unaddressed for r->main->blocked. + +Operations beyond the limit are now performed synchronously where a +synchronous path exists, and refused otherwise, so that the counter +cannot overflow. + +Reported by cyberlancer. + +CVE: CVE-2026-97205 +Upstream-Status: Backport [https://github.com/nginx/nginx/commit/587c47aed19ddec799eee953a38837936e585b39] + +Signed-off-by: Hetvi Thakar <[email protected]> +--- + src/http/ngx_http_copy_filter_module.c | 36 ++++++++++++++++++++++++++ + src/http/ngx_http_file_cache.c | 12 +++++++-- + src/http/ngx_http_request.h | 1 + + src/http/ngx_http_upstream.c | 6 +++++ + 4 files changed, 53 insertions(+), 2 deletions(-) + +diff --git a/src/http/ngx_http_copy_filter_module.c b/src/http/ngx_http_copy_filter_module.c +index 8e5de2bf70..6b233c48cc 100644 +--- a/src/http/ngx_http_copy_filter_module.c ++++ b/src/http/ngx_http_copy_filter_module.c +@@ -87,6 +87,13 @@ ngx_http_copy_filter(ngx_http_request_t *r, ngx_chain_t *in) + ngx_output_chain_ctx_t *ctx; + ngx_http_core_loc_conf_t *clcf; + ngx_http_copy_filter_conf_t *conf; ++#if (NGX_HAVE_FILE_AIO) ++ ngx_output_chain_aio_pt aio_handler; ++#endif ++#if (NGX_THREADS) ++ ngx_int_t (*thread_handler)(ngx_thread_task_t *task, ++ ngx_file_t *file); ++#endif + + c = r->connection; + +@@ -140,10 +147,39 @@ ngx_http_copy_filter(ngx_http_request_t *r, ngx_chain_t *in) + + #if (NGX_HAVE_FILE_AIO || NGX_THREADS) + ctx->aio = r->aio; ++ ++#if (NGX_HAVE_FILE_AIO) ++ aio_handler = ctx->aio_handler; ++#endif ++#if (NGX_THREADS) ++ thread_handler = ctx->thread_handler; ++#endif ++ ++ /* ++ * each pending operation holds a reference in r->main->blocked; ++ * with the counter close to its limit the file is read ++ * synchronously instead, so that it cannot overflow ++ */ ++ ++ if (r->main->blocked >= NGX_HTTP_MAX_BLOCKED) { ++#if (NGX_HAVE_FILE_AIO) ++ ctx->aio_handler = NULL; ++#endif ++#if (NGX_THREADS) ++ ctx->thread_handler = NULL; ++#endif ++ } + #endif + + rc = ngx_output_chain(ctx, in); + ++#if (NGX_HAVE_FILE_AIO) ++ ctx->aio_handler = aio_handler; ++#endif ++#if (NGX_THREADS) ++ ctx->thread_handler = thread_handler; ++#endif ++ + if (ctx->in == NULL) { + r->buffered &= ~NGX_HTTP_COPY_BUFFERED; + +diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c +index 5209f003b0..d3d0f039cd 100644 +--- a/src/http/ngx_http_file_cache.c ++++ b/src/http/ngx_http_file_cache.c +@@ -440,6 +440,10 @@ ngx_http_file_cache_lock(ngx_http_request_t *r, ngx_http_cache_t *c) + return NGX_HTTP_CACHE_SCARCE; + } + ++ if (r->main->blocked >= NGX_HTTP_MAX_BLOCKED) { ++ return NGX_HTTP_CACHE_SCARCE; ++ } ++ + c->waiting = 1; + + if (c->wait_time == 0) { +@@ -692,7 +696,9 @@ ngx_http_file_cache_aio_read(ngx_http_request_t *r, ngx_http_cache_t *c) + + #if (NGX_HAVE_FILE_AIO) + +- if (clcf->aio == NGX_HTTP_AIO_ON && ngx_file_aio) { ++ if (clcf->aio == NGX_HTTP_AIO_ON && ngx_file_aio ++ && r->main->blocked < NGX_HTTP_MAX_BLOCKED) ++ { + n = ngx_file_aio_read(&c->file, c->buf->pos, c->body_start, 0, r->pool); + + if (n != NGX_AGAIN) { +@@ -717,7 +723,9 @@ ngx_http_file_cache_aio_read(ngx_http_request_t *r, ngx_http_cache_t *c) + + #if (NGX_THREADS) + +- if (clcf->aio == NGX_HTTP_AIO_THREADS) { ++ if (clcf->aio == NGX_HTTP_AIO_THREADS ++ && r->main->blocked < NGX_HTTP_MAX_BLOCKED) ++ { + c->file.thread_task = c->thread_task; + c->file.thread_handler = ngx_http_cache_thread_handler; + c->file.thread_ctx = r; +diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h +index 48eb43eb0f..84f3117dd5 100644 +--- a/src/http/ngx_http_request.h ++++ b/src/http/ngx_http_request.h +@@ -11,6 +11,7 @@ + + #define NGX_HTTP_MAX_URI_CHANGES 10 + #define NGX_HTTP_MAX_SUBREQUESTS 50 ++#define NGX_HTTP_MAX_BLOCKED 250 + + /* must be 2^n */ + #define NGX_HTTP_LC_HEADER_LEN 32 +diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c +index fe2c6b8956..449508ac7b 100644 +--- a/src/http/ngx_http_upstream.c ++++ b/src/http/ngx_http_upstream.c +@@ -4184,6 +4184,12 @@ ngx_http_upstream_thread_handler(ngx_thread_task_t *task, ngx_file_t *file) + task->event.data = r; + task->event.handler = ngx_http_upstream_thread_event_handler; + ++ if (r->main->blocked >= NGX_HTTP_MAX_BLOCKED) { ++ ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, ++ "too many operations pending"); ++ return NGX_ERROR; ++ } ++ + if (ngx_thread_task_post(tp, task) != NGX_OK) { + return NGX_ERROR; + }
meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb +1 -0
@@ -18,6 +18,7 @@ SRC_URI:append = " \ file://CVE-2026-95101.patch \ file://CVE-2026-97629.patch \ file://CVE-2026-15176.patch \ + file://CVE-2026-97205.patch \ " LIC_FILES_CHKSUM = "file://LICENSE;md5=3dc49537b08b14c8b66ad247bb4c4593"
meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb +1 -0
@@ -18,6 +18,7 @@ SRC_URI:append = " \ file://CVE-2026-95101.patch \ file://CVE-2026-97629.patch \ file://CVE-2026-15176.patch \ + file://CVE-2026-97205.patch \ " # 1.28.x branch is the current stable branch, the recommended default
Signature · 1 line
2.35.6
PATCH 2/10 nginx: fix CVE-2026-123633
From: Hetvi Thakar <[email protected]>
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
--- .../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
meta-webserver/recipes-httpd/nginx/files/CVE-2026-123633.patch new file +49 -0
@@ -0,0 +1,49 @@ +From 0c87dd1db413e440a4e3ef7ee8acc518509e8809 Mon Sep 17 00:00:00 2001 +From: Roman Arutyunyan <[email protected]> +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 <[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 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 +
meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb +1 -0
@@ -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"
meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb +1 -0
@@ -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
Signature · 1 line
2.35.6
PATCH 3/10 nginx: fix CVE-2026-123640
In reply to Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Hetvi Thakar <[email protected]>
This patch applies the upstream nginx stable backport for CVE-2026-123640. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2]. The individual backported commit links are recorded in the embedded patch headers.
[1] https://github.com/nginx/nginx/commit/63d74d545295faa3d147ef704d740da4805f13f4
[2] https://ubuntu.com/security/CVE-2026-123640
--- .../nginx/files/CVE-2026-123640_p1.patch | 121 ++++++++++++++++++ .../nginx/files/CVE-2026-123640_p2.patch | 61 +++++++++ .../recipes-httpd/nginx/nginx_1.28.3.bb | 2 + .../recipes-httpd/nginx/nginx_1.29.7.bb | 2 + 4 files changed, 186 insertions(+) create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-123640_p1.patch create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-123640_p2.patch
meta-webserver/recipes-httpd/nginx/files/CVE-2026-123640_p1.patch new file +121 -0
@@ -0,0 +1,121 @@ +From 63d74d545295faa3d147ef704d740da4805f13f4 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin <[email protected]> +Date: Mon, 21 Sep 2026 09:57:19 -0700 +Subject: [PATCH] Stream ssl_preread: forbid trailing data in extensions + +As required explicitly in RFC 9846 Section 4.3 and implicitly in all the +previous versions of TLS extensions specification. + +Reported by Vivek Parikh, BreachX Zero Day Labs using Typhon AI Mil v2. + +CVE: CVE-2026-123640 +Upstream-Status: Backport [https://github.com/nginx/nginx/commit/63d74d545295faa3d147ef704d740da4805f13f4] + +Signed-off-by: Hetvi Thakar <[email protected]> +--- + src/stream/ngx_stream_ssl_preread_module.c | 40 +++++++++++++++++++--- + 1 file changed, 35 insertions(+), 5 deletions(-) + +diff --git a/src/stream/ngx_stream_ssl_preread_module.c b/src/stream/ngx_stream_ssl_preread_module.c +index 3fc83ff..8f2d333 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,6 +356,8 @@ ngx_stream_ssl_preread_parse_record(ngx_stream_ssl_preread_ctx_t *ctx, + break; + + case sw_ext_header: ++ ext = (p[2] << 8) + p[3]; ++ + if (p[0] == 0 && p[1] == 0 && ctx->host.data == NULL) { + /* SNI extension */ + state = sw_sni_len; +@@ -372,11 +384,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 +434,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 +492,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 +509,6 @@ ngx_stream_ssl_preread_parse_record(ngx_stream_ssl_preread_ctx_t *ctx, + + state = sw_ext; + dst = NULL; +- size = p[0]; + break; + } + +-- +2.35.6 +
meta-webserver/recipes-httpd/nginx/files/CVE-2026-123640_p2.patch new file +61 -0
61 lines not on this page · raw message
meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb +2 -0
@@ -20,6 +20,8 @@ SRC_URI:append = " \ file://CVE-2026-15176.patch \ file://CVE-2026-97205.patch \ file://CVE-2026-123633.patch \ + file://CVE-2026-123640_p1.patch \ + file://CVE-2026-123640_p2.patch \ " LIC_FILES_CHKSUM = "file://LICENSE;md5=3dc49537b08b14c8b66ad247bb4c4593"
meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb +2 -0
@@ -20,6 +20,8 @@ SRC_URI:append = " \ file://CVE-2026-15176.patch \ file://CVE-2026-97205.patch \ file://CVE-2026-123633.patch \ + file://CVE-2026-123640_p1.patch \ + file://CVE-2026-123640_p2.patch \ " # 1.28.x branch is the current stable branch, the recommended default
Signature · 1 line
2.35.6
PATCH 4/10 nginx: fix CVE-2026-120967
In reply to Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Hetvi Thakar <[email protected]>
This patch applies the upstream nginx stable backport for CVE-2026-120967. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2].
[1] https://github.com/nginx/nginx/commit/77f90f1c0cbf79145e5667b7e171f8766ccb6765
[2] https://ubuntu.com/security/CVE-2026-120967
--- .../nginx/files/CVE-2026-120967.patch | 42 +++++++++++++++++++ .../recipes-httpd/nginx/nginx_1.28.3.bb | 1 + .../recipes-httpd/nginx/nginx_1.29.7.bb | 1 + 3 files changed, 44 insertions(+) create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-120967.patch
meta-webserver/recipes-httpd/nginx/files/CVE-2026-120967.patch new file +42 -0
@@ -0,0 +1,42 @@ +From 77f90f1c0cbf79145e5667b7e171f8766ccb6765 Mon Sep 17 00:00:00 2001 +From: Vadim Zhestikov <[email protected]> +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. + +CVE: CVE-2026-120967 +Upstream-Status: Backport [https://github.com/nginx/nginx/commit/77f90f1c0cbf79145e5667b7e171f8766ccb6765] + +Signed-off-by: Hetvi Thakar <[email protected]> +--- + 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 85a74ce..2d6ada9 100644 +--- a/src/stream/ngx_stream_ssl_module.c ++++ b/src/stream/ngx_stream_ssl_module.c +@@ -432,6 +432,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); + +-- +2.35.6 +
meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb +1 -0
@@ -22,6 +22,7 @@ SRC_URI:append = " \ file://CVE-2026-123633.patch \ file://CVE-2026-123640_p1.patch \ file://CVE-2026-123640_p2.patch \ + file://CVE-2026-120967.patch \ " LIC_FILES_CHKSUM = "file://LICENSE;md5=3dc49537b08b14c8b66ad247bb4c4593"
meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb +1 -0
@@ -22,6 +22,7 @@ SRC_URI:append = " \ file://CVE-2026-123633.patch \ file://CVE-2026-123640_p1.patch \ file://CVE-2026-123640_p2.patch \ + file://CVE-2026-120967.patch \ " # 1.28.x branch is the current stable branch, the recommended default
Signature · 1 line
2.35.6
PATCH 5/10 nginx: fix CVE-2026-118899
In reply to Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Hetvi Thakar <[email protected]>
This patch applies the upstream nginx stable backport for CVE-2026-118899. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2]. The individual backported commit links are recorded in the embedded patch headers.
[1] https://github.com/nginx/nginx/commit/1b723277aa556ba4c6e40cc8f0f0b465e29c0a13
[2] https://ubuntu.com/security/CVE-2026-118899
--- .../nginx/files/CVE-2026-118899_p1.patch | 43 +++++++++++++++++++ .../nginx/files/CVE-2026-118899_p2.patch | 37 ++++++++++++++++ .../recipes-httpd/nginx/nginx_1.28.3.bb | 2 + .../recipes-httpd/nginx/nginx_1.29.7.bb | 2 + 4 files changed, 84 insertions(+) create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-118899_p1.patch create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-118899_p2.patch
meta-webserver/recipes-httpd/nginx/files/CVE-2026-118899_p1.patch new file +43 -0
@@ -0,0 +1,43 @@ +From 1b723277aa556ba4c6e40cc8f0f0b465e29c0a13 Mon Sep 17 00:00:00 2001 +From: Maxim Dounin <[email protected]> +Date: Sat, 30 Mar 2024 05:06:59 +0300 +Subject: [PATCH] Request body: explicit handling of NGX_AGAIN. + +Request body reading indirectly uses the "do { c->recv() } while +(c->read->ready)" form, which is not really correct, as for example with +SSL c->read->ready may be still set when c->recv() returns NGX_AGAIN due +to SSL_ERROR_WANT_WRITE (see 7351:2b5528023f6b), and therefore this form +might be an infinite loop. + +Added explicit NGX_AGAIN handling for the sake of correctness. + +CVE: CVE-2026-118899 +Upstream-Status: Backport [https://github.com/nginx/nginx/commit/1b723277aa556ba4c6e40cc8f0f0b465e29c0a13] + +Signed-off-by: Elijah Zupancic <[email protected]> +Origin: <https://freenginx.org/hg/nginx/rev/392e8e2fd22a8461e75a67d5d33d85c07974e1e3> +Signed-off-by: Hetvi Thakar <[email protected]> +--- + src/http/ngx_http_request_body.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) +diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c +index 93c69220c5..6e24131518 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);
meta-webserver/recipes-httpd/nginx/files/CVE-2026-118899_p2.patch new file +37 -0
@@ -0,0 +1,37 @@ +From d1640655f46c5a2d32fefc2c818583f203e47536 Mon Sep 17 00:00:00 2001 +From: Roman Arutyunyan <[email protected]> +Date: Tue, 27 Oct 2026 15:02:12 +0400 +Subject: [PATCH] HTTP/3: explicit handling of NGX_AGAIN + +Following the previous change, this change adds explicit handling +of NGX_AGAIN while reading HTTP/3 request body for the sake of +correctness. + +CVE: CVE-2026-118899 +Upstream-Status: Backport [https://github.com/nginx/nginx/commit/d1640655f46c5a2d32fefc2c818583f203e47536] + +Signed-off-by: Hetvi Thakar <[email protected]> +--- + src/http/v3/ngx_http_v3_request.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) +diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c +index 7bb61311d9..2685af53f7 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);
meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb +2 -0
@@ -23,6 +23,8 @@ SRC_URI:append = " \ file://CVE-2026-123640_p1.patch \ file://CVE-2026-123640_p2.patch \ file://CVE-2026-120967.patch \ + file://CVE-2026-118899_p1.patch \ + file://CVE-2026-118899_p2.patch \ " LIC_FILES_CHKSUM = "file://LICENSE;md5=3dc49537b08b14c8b66ad247bb4c4593"
meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb +2 -0
@@ -23,6 +23,8 @@ SRC_URI:append = " \ file://CVE-2026-123640_p1.patch \ file://CVE-2026-123640_p2.patch \ file://CVE-2026-120967.patch \ + file://CVE-2026-118899_p1.patch \ + file://CVE-2026-118899_p2.patch \ " # 1.28.x branch is the current stable branch, the recommended default
Signature · 1 line
2.35.6
PATCH 6/10 nginx: fix CVE-2026-123634
In reply to Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Hetvi Thakar <[email protected]>
This patch applies the upstream nginx stable backport for CVE-2026-123634. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2]. The individual backported commit links are recorded in the embedded patch headers.
[1] https://github.com/nginx/nginx/commit/7426c29f140c330dd6c6cdfeb2943be1978c69e0
[2] https://ubuntu.com/security/CVE-2026-123634
--- .../files/CVE-2026-123634-dependent.patch | 71 +++++++++ .../nginx/files/CVE-2026-123634.patch | 135 ++++++++++++++++++ .../recipes-httpd/nginx/nginx_1.28.3.bb | 2 + .../recipes-httpd/nginx/nginx_1.29.7.bb | 2 + 4 files changed, 210 insertions(+) create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-123634-dependent.patch create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-123634.patch
meta-webserver/recipes-httpd/nginx/files/CVE-2026-123634-dependent.patch new file +71 -0
@@ -0,0 +1,71 @@ +From 338f6231e347c17a07c381802b1bc3c20c55b529 Mon Sep 17 00:00:00 2001 +From: Roman Arutyunyan <[email protected]> +Date: Fri, 6 Nov 2026 20:02:09 +0400 +Subject: [PATCH] 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. + +CVE: CVE-2026-123634 +Upstream-Status: Backport [https://github.com/nginx/nginx/commit/338f6231e347c17a07c381802b1bc3c20c55b529] + +Signed-off-by: Hetvi Thakar <[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 f8f677878a..ec3df0e875 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 */
meta-webserver/recipes-httpd/nginx/files/CVE-2026-123634.patch new file +135 -0
135 lines not on this page · raw message
meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb +2 -0
@@ -25,6 +25,8 @@ SRC_URI:append = " \ file://CVE-2026-120967.patch \ file://CVE-2026-118899_p1.patch \ file://CVE-2026-118899_p2.patch \ + file://CVE-2026-123634-dependent.patch \ + file://CVE-2026-123634.patch \ " LIC_FILES_CHKSUM = "file://LICENSE;md5=3dc49537b08b14c8b66ad247bb4c4593"
meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb +2 -0
@@ -25,6 +25,8 @@ SRC_URI:append = " \ file://CVE-2026-120967.patch \ file://CVE-2026-118899_p1.patch \ file://CVE-2026-118899_p2.patch \ + file://CVE-2026-123634-dependent.patch \ + file://CVE-2026-123634.patch \ " # 1.28.x branch is the current stable branch, the recommended default
Signature · 1 line
2.35.6
PATCH 7/10 nginx: fix CVE-2026-123007
In reply to Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Hetvi Thakar <[email protected]>
This patch applies the upstream nginx stable backport for CVE-2026-123007. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2].
[1] https://github.com/nginx/nginx/commit/b89c4100bf6762a45e4a6463eaf4b70368277c94
[2] https://ubuntu.com/security/CVE-2026-123007
--- .../nginx/files/CVE-2026-123007.patch | 90 +++++++++++++++++++ .../recipes-httpd/nginx/nginx_1.28.3.bb | 1 + .../recipes-httpd/nginx/nginx_1.29.7.bb | 1 + 3 files changed, 92 insertions(+) create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-123007.patch
meta-webserver/recipes-httpd/nginx/files/CVE-2026-123007.patch new file +90 -0
@@ -0,0 +1,90 @@ +From b89c4100bf6762a45e4a6463eaf4b70368277c94 Mon Sep 17 00:00:00 2001 +From: Roman Arutyunyan <[email protected]> +Date: Thu, 29 Oct 2026 21:37:05 +0400 +Subject: [PATCH] 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. + +CVE: CVE-2026-123007 +Upstream-Status: Backport [https://github.com/nginx/nginx/commit/b89c4100bf6762a45e4a6463eaf4b70368277c94] + +Signed-off-by: Hetvi Thakar <[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 e0e7ef379b..e5d93733f0 100644 +--- a/src/http/v2/ngx_http_v2.c ++++ b/src/http/v2/ngx_http_v2.c +@@ -2484,13 +2484,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 beb77a5c1d..0c8066e665 100644 +--- a/src/http/v2/ngx_http_v2.h ++++ b/src/http/v2/ngx_http_v2.h +@@ -137,6 +137,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 6b73b1e687..fe235fbd89 100644 +--- a/src/http/v2/ngx_http_v2_filter_module.c ++++ b/src/http/v2/ngx_http_v2_filter_module.c +@@ -1224,6 +1224,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++; +@@ -1619,6 +1620,7 @@ ngx_http_v2_data_frame_handler(ngx_http_v2_connection_t *h2c, + 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); + +@@ -1753,6 +1755,7 @@ ngx_http_v2_filter_cleanup(void *data) + } + + h2c->send_window += window; ++ h2c->send_queued -= window; + } + +
meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb +1 -0
@@ -27,6 +27,7 @@ SRC_URI:append = " \ file://CVE-2026-118899_p2.patch \ file://CVE-2026-123634-dependent.patch \ file://CVE-2026-123634.patch \ + file://CVE-2026-123007.patch \ " LIC_FILES_CHKSUM = "file://LICENSE;md5=3dc49537b08b14c8b66ad247bb4c4593"
meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb +1 -0
@@ -27,6 +27,7 @@ SRC_URI:append = " \ file://CVE-2026-118899_p2.patch \ file://CVE-2026-123634-dependent.patch \ file://CVE-2026-123634.patch \ + file://CVE-2026-123007.patch \ " # 1.28.x branch is the current stable branch, the recommended default
Signature · 1 line
2.35.6
PATCH 8/10 nginx: fix CVE-2026-113425
In reply to Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Hetvi Thakar <[email protected]>
This patch applies the upstream nginx stable backport for CVE-2026-113425. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2]. The individual backported commit links are recorded in the embedded patch headers.
[1] https://github.com/nginx/nginx/commit/df9d8d940ecb83a50b1e55ccc296d0a29cfe774c
[2] https://ubuntu.com/security/CVE-2026-113425
--- .../files/CVE-2026-113425-dependent.patch | 88 ++++++++++++++ .../nginx/files/CVE-2026-113425_p1.patch | 40 +++++++ .../nginx/files/CVE-2026-113425_p2.patch | 83 +++++++++++++ .../nginx/files/CVE-2026-113425_p3.patch | 67 +++++++++++ .../nginx/files/CVE-2026-113425_p4.patch | 112 ++++++++++++++++++ .../recipes-httpd/nginx/nginx_1.28.3.bb | 5 + .../recipes-httpd/nginx/nginx_1.29.7.bb | 5 + 7 files changed, 400 insertions(+) create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-113425-dependent.patch create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-113425_p1.patch create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-113425_p2.patch create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-113425_p3.patch create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-113425_p4.patch
meta-webserver/recipes-httpd/nginx/files/CVE-2026-113425-dependent.patch new file +88 -0
@@ -0,0 +1,88 @@ +From 9e811a43119ac902f0d0296fb4afb34bb063cf1b Mon Sep 17 00:00:00 2001 +From: Maxim Dounin <[email protected]> +Date: Sat, 20 Jun 2026 05:04:41 +0300 +Subject: [PATCH] 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 + +CVE: CVE-2026-113425 +Upstream-Status: Backport [https://github.com/nginx/nginx/commit/9e811a43119ac902f0d0296fb4afb34bb063cf1b] + +Signed-off-by: Vadim Zhestikov <[email protected]> +Origin: <https://freenginx.org/hg/nginx/rev/87725983f346> +Signed-off-by: Hetvi Thakar <[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 a88e6c2873..c167360ca3 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 @@ ngx_mail_send(ngx_event_t *wev) + + 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) + {
meta-webserver/recipes-httpd/nginx/files/CVE-2026-113425_p1.patch new file +40 -0
@@ -0,0 +1,40 @@ +From df9d8d940ecb83a50b1e55ccc296d0a29cfe774c Mon Sep 17 00:00:00 2001 +From: Vadim Zhestikov <[email protected]> +Date: Wed, 4 Nov 2026 09:54:11 -0800 +Subject: [PATCH] Mail: fixed use-after-free on client reset during auth_http + request + +When a client command starts an auth_http request, the default reply +set by the POP3, IMAP and SMTP auth state handlers remains in s->out, +though it is never used: the actual reply depends on the auth_http +response. With ngx_mail_send() as the client write handler, the reply +could be sent before the authentication result was known, and if the +client reset the connection, the failed send destroyed the session +while the auth_http connection still referenced it. + +The queued reply is now discarded when the auth_http request starts, +similarly to ngx_mail_proxy_init(). + +Reported by Xint.io. + +CVE: CVE-2026-113425 +Upstream-Status: Backport [https://github.com/nginx/nginx/commit/df9d8d940ecb83a50b1e55ccc296d0a29cfe774c] + +Signed-off-by: Hetvi Thakar <[email protected]> +--- + src/mail/ngx_mail_auth_http_module.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/mail/ngx_mail_auth_http_module.c b/src/mail/ngx_mail_auth_http_module.c +index 3e5095a2d2..ba166cdb26 100644 +--- a/src/mail/ngx_mail_auth_http_module.c ++++ b/src/mail/ngx_mail_auth_http_module.c +@@ -216,6 +216,8 @@ 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; + ctx->peer.connection->read->handler = ngx_mail_auth_http_read_handler; + ctx->peer.connection->write->handler = ngx_mail_auth_http_write_handler;
meta-webserver/recipes-httpd/nginx/files/CVE-2026-113425_p2.patch new file +83 -0
83 lines not on this page · raw message
meta-webserver/recipes-httpd/nginx/files/CVE-2026-113425_p3.patch new file +67 -0
67 lines not on this page · raw message
meta-webserver/recipes-httpd/nginx/files/CVE-2026-113425_p4.patch new file +112 -0
112 lines not on this page · raw message
meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb +5 -0
@@ -28,6 +28,11 @@ SRC_URI:append = " \ file://CVE-2026-123634-dependent.patch \ file://CVE-2026-123634.patch \ file://CVE-2026-123007.patch \ + file://CVE-2026-113425-dependent.patch \ + file://CVE-2026-113425_p1.patch \ + file://CVE-2026-113425_p2.patch \ + file://CVE-2026-113425_p3.patch \ + file://CVE-2026-113425_p4.patch \ " LIC_FILES_CHKSUM = "file://LICENSE;md5=3dc49537b08b14c8b66ad247bb4c4593"
meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb +5 -0
@@ -28,6 +28,11 @@ SRC_URI:append = " \ file://CVE-2026-123634-dependent.patch \ file://CVE-2026-123634.patch \ file://CVE-2026-123007.patch \ + file://CVE-2026-113425-dependent.patch \ + file://CVE-2026-113425_p1.patch \ + file://CVE-2026-113425_p2.patch \ + file://CVE-2026-113425_p3.patch \ + file://CVE-2026-113425_p4.patch \ " # 1.28.x branch is the current stable branch, the recommended default
Signature · 1 line
2.35.6
PATCH 9/10 nginx: fix CVE-2026-121810
In reply to Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Hetvi Thakar <[email protected]>
This patch applies the upstream nginx stable backport for CVE-2026-121810. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2].
[1] https://github.com/nginx/nginx/commit/c58d2a22d12350766185c94f2245bf4be5bcfb7d
[2] https://ubuntu.com/security/CVE-2026-121810
--- .../nginx/files/CVE-2026-121810.patch | 64 +++++++++++++++++++ .../recipes-httpd/nginx/nginx_1.28.3.bb | 1 + .../recipes-httpd/nginx/nginx_1.29.7.bb | 1 + 3 files changed, 66 insertions(+) create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-121810.patch
meta-webserver/recipes-httpd/nginx/files/CVE-2026-121810.patch new file +64 -0
@@ -0,0 +1,64 @@ +From c58d2a22d12350766185c94f2245bf4be5bcfb7d Mon Sep 17 00:00:00 2001 +From: Roman Arutyunyan <[email protected]> +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. + +CVE: CVE-2026-121810 +Upstream-Status: Backport [https://github.com/nginx/nginx/commit/c58d2a22d12350766185c94f2245bf4be5bcfb7d] + +Signed-off-by: Hetvi Thakar <[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 +--- 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; + } +
meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb +1 -0
@@ -33,6 +33,7 @@ SRC_URI:append = " \ file://CVE-2026-113425_p2.patch \ file://CVE-2026-113425_p3.patch \ file://CVE-2026-113425_p4.patch \ + file://CVE-2026-121810.patch \ " LIC_FILES_CHKSUM = "file://LICENSE;md5=3dc49537b08b14c8b66ad247bb4c4593"
meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb +1 -0
@@ -33,6 +33,7 @@ SRC_URI:append = " \ file://CVE-2026-113425_p2.patch \ file://CVE-2026-113425_p3.patch \ file://CVE-2026-113425_p4.patch \ + file://CVE-2026-121810.patch \ " # 1.28.x branch is the current stable branch, the recommended default
Signature · 1 line
2.35.6
PATCH 10/10 nginx: fix CVE-2026-125283
In reply to Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Hetvi Thakar <[email protected]>
This patch applies the upstream nginx stable backport for CVE-2026-125283. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2].
[1] https://github.com/nginx/nginx/commit/b99b6b528b64e93354b5c3453e45701e70c461a8
[2] https://ubuntu.com/security/CVE-2026-125283
--- .../nginx/files/CVE-2026-125283.patch | 35 +++++++++++++++++++ .../recipes-httpd/nginx/nginx_1.28.3.bb | 1 + .../recipes-httpd/nginx/nginx_1.29.7.bb | 1 + 3 files changed, 37 insertions(+) create mode 100644 meta-webserver/recipes-httpd/nginx/files/CVE-2026-125283.patch
meta-webserver/recipes-httpd/nginx/files/CVE-2026-125283.patch new file +35 -0
@@ -0,0 +1,35 @@ +From b99b6b528b64e93354b5c3453e45701e70c461a8 Mon Sep 17 00:00:00 2001 +From: Roman Arutyunyan <[email protected]> +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. + +CVE: CVE-2026-125283 +Upstream-Status: Backport [https://github.com/nginx/nginx/commit/b99b6b528b64e93354b5c3453e45701e70c461a8] + +Signed-off-by: Hetvi Thakar <[email protected]> +--- + 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 bbdab85984..9092602857 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';
meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb +1 -0
@@ -34,6 +34,7 @@ SRC_URI:append = " \ file://CVE-2026-113425_p3.patch \ file://CVE-2026-113425_p4.patch \ file://CVE-2026-121810.patch \ + file://CVE-2026-125283.patch \ " LIC_FILES_CHKSUM = "file://LICENSE;md5=3dc49537b08b14c8b66ad247bb4c4593"
meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb +1 -0
@@ -34,6 +34,7 @@ SRC_URI:append = " \ file://CVE-2026-113425_p3.patch \ file://CVE-2026-113425_p4.patch \ file://CVE-2026-121810.patch \ + file://CVE-2026-125283.patch \ " # 1.28.x branch is the current stable branch, the recommended default
Signature · 1 line
2.35.6