new file mode 100644
@@ -0,0 +1,64 @@
+From c58d2a22d12350766185c94f2245bf4be5bcfb7d Mon Sep 17 00:00:00 2001
+From: Roman Arutyunyan <arut@nginx.com>
+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 <hthakar@cisco.com>
+---
+ 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;
+ }
+
@@ -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"
@@ -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