new file mode 100644
@@ -0,0 +1,43 @@
+From 1b723277aa556ba4c6e40cc8f0f0b465e29c0a13 Mon Sep 17 00:00:00 2001
+From: Maxim Dounin <mdounin@mdounin.ru>
+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 <e.zupancic@f5.com>
+Origin: <https://freenginx.org/hg/nginx/rev/392e8e2fd22a8461e75a67d5d33d85c07974e1e3>
+Signed-off-by: Hetvi Thakar <hthakar@cisco.com>
+---
+ 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);
new file mode 100644
@@ -0,0 +1,37 @@
+From d1640655f46c5a2d32fefc2c818583f203e47536 Mon Sep 17 00:00:00 2001
+From: Roman Arutyunyan <arut@nginx.com>
+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 <hthakar@cisco.com>
+---
+ 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);
@@ -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"
@@ -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