diff mbox series

[meta-webserver,wrynose,04/10] nginx: fix CVE-2026-120967

Message ID 20261125061529.2721522-4-hthakar@cisco.com
State New
Headers show
Series [meta-webserver,wrynose,01/10] nginx: fix CVE-2026-97205 | expand

Commit Message

From: Hetvi Thakar <hthakar@cisco.com>

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

Signed-off-by: Hetvi Thakar <hthakar@cisco.com>
---
 .../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
diff mbox series

Patch

diff --git a/meta-webserver/recipes-httpd/nginx/files/CVE-2026-120967.patch b/meta-webserver/recipes-httpd/nginx/files/CVE-2026-120967.patch
new file mode 100644
index 0000000000..805db495bf
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/files/CVE-2026-120967.patch
@@ -0,0 +1,42 @@ 
+From 77f90f1c0cbf79145e5667b7e171f8766ccb6765 Mon Sep 17 00:00:00 2001
+From: Vadim Zhestikov <v.zhestikov@f5.com>
+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 <hthakar@cisco.com>
+---
+ 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
+
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb
index 717e651e13..d6a30764ab 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.28.3.bb
@@ -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"
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb
index d0766e4d20..d38199ba49 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.29.7.bb
@@ -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