CVE fixed:
- CVE-2025-14523 libsoup: Duplicate Host Header Handling Causes Host-Parsing 
Discrepancy (First- vs Last-Value Wins)
Upstream-Status: Backport from 
https://gitlab.gnome.org/GNOME/libsoup/-/commit/383cc02354c2a4235a98338005f8b47ffab4e53a

Signed-off-by: Rohini Sangam <[email protected]>
---
 .../libsoup/libsoup-2.4/CVE-2025-14523.patch  | 79 +++++++++++++++++++
 .../libsoup/libsoup-2.4_2.74.2.bb             |  1 +
 2 files changed, 80 insertions(+)
 create mode 100644 
meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-14523.patch

diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-14523.patch 
b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-14523.patch
new file mode 100644
index 0000000000..3b534a64d5
--- /dev/null
+++ b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-14523.patch
@@ -0,0 +1,79 @@
+From 383cc02354c2a4235a98338005f8b47ffab4e53a Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <[email protected]>
+Date: Wed, 7 Jan 2026 14:50:33 -0600
+Subject: [PATCH] Reject duplicate Host headers (for libsoup 2)
+
+https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/491
+
+Upstream-Status: Backport from 
https://gitlab.gnome.org/GNOME/libsoup/-/commit/383cc02354c2a4235a98338005f8b47ffab4e53a
+CVE: CVE-2025-14523
+
+Signed-off-by: Rohini Sangam <[email protected]>
+---
+ libsoup/soup-headers.c         |  3 +++
+ libsoup/soup-message-headers.c |  3 +++
+ tests/header-parsing-test.c    | 20 +++++++++++++++++++-
+ 3 files changed, 25 insertions(+), 1 deletion(-)
+
+diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c
+index ea2f986..6cd3dad 100644
+--- a/libsoup/soup-headers.c
++++ b/libsoup/soup-headers.c
+@@ -138,6 +138,9 @@ soup_headers_parse (const char *str, int len, 
SoupMessageHeaders *dest)
+               for (p = strchr (value, '\r'); p; p = strchr (p, '\r'))
+                       *p = ' ';
+ 
++              if (g_ascii_strcasecmp (name, "Host") == 0 && 
soup_message_headers_get_one (dest, "Host"))
++                      goto done;
++
+               soup_message_headers_append (dest, name, value);
+         }
+       success = TRUE;
+diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
+index ff10e10..4fc6768 100644
+--- a/libsoup/soup-message-headers.c
++++ b/libsoup/soup-message-headers.c
+@@ -220,6 +220,9 @@ soup_message_headers_append (SoupMessageHeaders *hdrs,
+       }
+ #endif
+ 
++      if (g_ascii_strcasecmp (name, "Host") == 0 && 
soup_message_headers_get_one (hdrs, "Host"))
++              return;
++
+       header.name = intern_header_name (name, &setter);
+       header.value = g_strdup (value);
+       g_array_append_val (hdrs->array, header);
+diff --git a/tests/header-parsing-test.c b/tests/header-parsing-test.c
+index d20da95..63e6424 100644
+--- a/tests/header-parsing-test.c
++++ b/tests/header-parsing-test.c
+@@ -459,7 +459,25 @@ static struct RequestTest {
+       { "NUL in header value", NULL,
+         "HTTP/1.1 200 OK\r\nFoo: b\x00" "ar\r\n", 28,
+         SOUP_STATUS_BAD_REQUEST,
+-           NULL, NULL, -1,
++          NULL, NULL, -1,
++        { { NULL } },
++      },
++
++      { "Duplicate Host headers",
++        "https://gitlab.gnome.org/GNOME/libsoup/-/issues/472";,
++        "GET / HTTP/1.1\r\nHost: example.com\r\nHost: example.org\r\n",
++        -1,
++        SOUP_STATUS_BAD_REQUEST,
++        NULL, NULL, -1,
++        { { NULL } }
++      },
++
++      { "Duplicate Host headers (case insensitive)",
++        "https://gitlab.gnome.org/GNOME/libsoup/-/issues/472";,
++        "GET / HTTP/1.1\r\nHost: example.com\r\nhost: example.org\r\n",
++        -1,
++        SOUP_STATUS_BAD_REQUEST,
++          NULL, NULL, -1,
+         { { NULL } }
+       },
+ 
+-- 
+2.35.7
+
diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb 
b/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb
index 0cc90a17cc..339b7260ee 100644
--- a/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb
+++ b/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb
@@ -43,6 +43,7 @@ SRC_URI = 
"${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \
            file://CVE-2025-4948.patch \
            file://CVE-2025-4476.patch \
            file://CVE-2025-4945.patch \
+           file://CVE-2025-14523.patch \
           "
 SRC_URI[sha256sum] = 
"f0a427656e5fe19e1df71c107e88dfa1b2e673c25c547b7823b6018b40d01159"
 
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#231293): 
https://lists.openembedded.org/g/openembedded-core/message/231293
Mute This Topic: https://lists.openembedded.org/mt/117873124/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to