From patchwork Tue May 13 10:51:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 62849 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7FC6C3ABC9 for ; Tue, 13 May 2025 10:51:41 +0000 (UTC) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mx.groups.io with SMTP id smtpd.web10.72958.1747133498319430912 for ; Tue, 13 May 2025 03:51:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=SWZ9UJjc; spf=pass (domain: mvista.com, ip: 209.85.210.169, mailfrom: vanusuri@mvista.com) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-73bf5aa95e7so5423117b3a.1 for ; Tue, 13 May 2025 03:51:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1747133497; x=1747738297; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=OnJNAMvByIXJIdPrX8aERCQD7n34IJG0ubAmNJng8iM=; b=SWZ9UJjcR7ATnCMvYA3j6zAbtOO5Rsc2FbSf7QxXVxfmiTFqGcSLbAh+A8L2KjdOvE K7pTgMOiZ2cGTvOJQr48ESD+iJlAq9ctWoXggzusZDyWj5dM93y7oUZ/nzNxPiZ+odut gp/Od43thxmYEjrVCn/8/aQ+0n/27TkIy5CW8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747133497; x=1747738297; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OnJNAMvByIXJIdPrX8aERCQD7n34IJG0ubAmNJng8iM=; b=LlDm3BIds2ucmQ9DzklO6PqZvNrmhM7EUddygzi06eRcbXgs3XcDmKATJL3IX9Vl5E zBJENf+R8hstpOL9f9W9hAL47GqxPkDGRluqhaH7tvqdugtU+VlkRgjuC8Ct7tGnyUUe n7DCOf1mU4NV4IU2dsyb8ixgskKgIIcB6VNDjon04OmyQa7EfkVgj9C0B/RkEP+r/CdW 5YBK2MI/2DfZtlVFDutbj8uwHXTt5YdsVyQIP3FAbVcu2YxmU8GTwYtVPHapk5fWOI5K +ir3LtvbX/HNFjcEo3Pac9HHFljQMzpDiUHD8/qSqCuTh2FugvEu0Q7oqkMGauhW85rn z0iQ== X-Gm-Message-State: AOJu0YykN86Tm/NLracP/XpbQZ6PB8pg9n2oNRjH4tu20jSkXwUqWhw+ 6LHrOxNOWCbkTt35hlh8x8wVNLKFlkDMc6Pa5qItZuu3YKzOuzDd/+Ly1Q3jrYyoPV1BRHr7OK3 NDns= X-Gm-Gg: ASbGncsaM8sx50fBotT9TFBtCXa86MsXcIYJogS/wXLPqiWPiiV+XauPGWFL53HSoKm Sbb4r5x0xPSiojjgOZSNzuM5XJFvKsnQ0yV1lGT/ngn5hzUfZRzvaXfwVh+Y1cGlE8sUcprVvdW Zxc+L8z4I9LZ79BSpsTO9Ht52ulm1IkWYr0iZHN9ijCbmxIpI4M52tPthlPngO0mUEMB/G1VpsZ viFFC06myc0Lu173WEt7Dq1rEVEpVtZfz1UevYasC7JF9FWdDf07vKVIBLPI+rBZwUfAgkmzQFh ise+KcVyRox1rL9Jr+r2QqsF+BPkgXz7M77js88SkDekmw5ZBqGpCRiWUuBDia0= X-Google-Smtp-Source: AGHT+IFvzYyhoJxzdx88nFW3340Zk0Zkvc0A9GbiVKfieZrHktsY0fxjz7wJ+yBInfhKMznBq5tWgQ== X-Received: by 2002:a05:6a20:7fa4:b0:210:1c3a:6804 with SMTP id adf61e73a8af0-215abc17ac7mr26153605637.31.1747133497296; Tue, 13 May 2025 03:51:37 -0700 (PDT) Received: from localhost.localdomain ([49.207.220.49]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a3d861sm7796759b3a.147.2025.05.13.03.51.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 May 2025 03:51:36 -0700 (PDT) From: vanusuri@mvista.com To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][kirkstone][PATCH 1/7] libsoup: update fix CVE-2024-52532 Date: Tue, 13 May 2025 16:21:23 +0530 Message-Id: <20250513105129.2284690-1-vanusuri@mvista.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 13 May 2025 10:51:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/216411 From: Vijay Anusuri Upstream-Status: Backport from https://gitlab.gnome.org/GNOME/libsoup/-/commit/4c9e75c6676a37b6485620c332e568e1a3f530ff Signed-off-by: Vijay Anusuri --- .../libsoup/libsoup/CVE-2024-52532-3.patch | 46 +++++++++++++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 1 + 2 files changed, 47 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2024-52532-3.patch diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2024-52532-3.patch b/meta/recipes-support/libsoup/libsoup/CVE-2024-52532-3.patch new file mode 100644 index 0000000000..edcca86e8c --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2024-52532-3.patch @@ -0,0 +1,46 @@ +From 4c9e75c6676a37b6485620c332e568e1a3f530ff Mon Sep 17 00:00:00 2001 +From: Simon McVittie +Date: Wed, 13 Nov 2024 14:14:23 +0000 +Subject: [PATCH] websocket-test: Disconnect error signal in another place + +This is the same change as commit 29b96fab "websocket-test: disconnect +error copy after the test ends", and is done for the same reason, but +replicating it into a different function. + +Fixes: 6adc0e3e "websocket: process the frame as soon as we read data" +Resolves: https://gitlab.gnome.org/GNOME/libsoup/-/issues/399 +Signed-off-by: Simon McVittie + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/4c9e75c6676a37b6485620c332e568e1a3f530ff] +CVE: CVE-2024-52532 +Signed-off-by: Vijay Anusuri +--- + tests/websocket-test.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tests/websocket-test.c b/tests/websocket-test.c +index 6a48c1f9..723f2857 100644 +--- a/tests/websocket-test.c ++++ b/tests/websocket-test.c +@@ -1508,8 +1508,9 @@ test_receive_invalid_encode_length_16 (Test *test, + GError *error = NULL; + InvalidEncodeLengthTest context = { test, NULL }; + guint i; ++ guint error_id; + +- g_signal_connect (test->client, "error", G_CALLBACK (on_error_copy), &error); ++ error_id = g_signal_connect (test->client, "error", G_CALLBACK (on_error_copy), &error); + g_signal_connect (test->client, "message", G_CALLBACK (on_binary_message), &received); + + /* We use 126(~) as payload length with 125 extended length */ +@@ -1522,6 +1523,7 @@ test_receive_invalid_encode_length_16 (Test *test, + WAIT_UNTIL (error != NULL || received != NULL); + g_assert_error (error, SOUP_WEBSOCKET_ERROR, SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR); + g_clear_error (&error); ++ g_signal_handler_disconnect (test->client, error_id); + g_assert_null (received); + + g_thread_join (thread); +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index 869f0f1696..4b723d3150 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb @@ -15,6 +15,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2024-52530.patch \ file://CVE-2024-52532-1.patch \ file://CVE-2024-52532-2.patch \ + file://CVE-2024-52532-3.patch \ file://CVE-2024-52531-1.patch \ file://CVE-2024-52531-2.patch \ file://CVE-2024-52531-3.patch \ From patchwork Tue May 13 10:51:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 62850 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FE80C3ABC9 for ; Tue, 13 May 2025 10:51:51 +0000 (UTC) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mx.groups.io with SMTP id smtpd.web11.73385.1747133502949391714 for ; Tue, 13 May 2025 03:51:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=HHQ5CtoJ; spf=pass (domain: mvista.com, ip: 209.85.210.173, mailfrom: vanusuri@mvista.com) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-7415d28381dso4474606b3a.1 for ; Tue, 13 May 2025 03:51:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1747133502; x=1747738302; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WxbLxAFaprAru4Pi+76UG/fWVcBtGGnHib+9sdl8VhI=; b=HHQ5CtoJqFkVO2a/WSb80HGNcyy98D3aVbP1UXoCRs/5SxNhROysOk0MZeyN/XEY4l fteA+ulVWG999WMW+5/2QqR9jFFNsoMhBWP5+UrR6/2u2iV3BDdkeLe9r6S5GO6Kk3Bt WTiu8S9nsBYDwOba3RBdzRPsQt50MMEkVhtgw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747133502; x=1747738302; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WxbLxAFaprAru4Pi+76UG/fWVcBtGGnHib+9sdl8VhI=; b=qX5C3h6cfH2gdwLBtEkMzKHRx/PdDUByp1nD04Ka/LdBECqdI5FYkfmWFs9Jj4a1xt yynxNQ7iyqUxRpRf3wpHpEDQQiraP3kMK8z9IN2h5zazEPUfhfHHN7Ox/ZzFonPyuxwc woK24VGhITo4kmR1YZGRFxA0Idj+Lp2DnDy/eT88b9tSWjRV0epV3oxTsB+7Q2g+TMb+ 7CsMeIMNYaBMA3MFWYZb5H5QLgfcXIxW6nSUcuYHLXD96wBKhcTr6DwIuh8SPBURQB9s jgt7zHXBrCr5GOa5rHcCCKvfxzWy5qfC+fzjo995N4o6Kj22uBzz6HJ0Ikx+5ApB74c1 WugA== X-Gm-Message-State: AOJu0YwkFPLyxFDaVckl7ldO8vd7Gd1VK4scpXxYVWsSgSOjme0pq91A sPaQ3oYQLDQxVFBbbznKuCFXYNZMTTiKmqqGvBvrOdgfhHuTvccvQldqXrjJUNFq3bML/Dvgpp5 OxLU= X-Gm-Gg: ASbGncsulMHUBGeR65ghbq1GKVnheg3fiu/vYTS3+J4wT76HSg62JSLoMqT1YN1xhfq r4z5MIliWH0MozE91yvjEWOHM3COQ9b1Ze04PRhiZNkKKiDUAz5WQRzbeZtMz1W0HWTEhaLtXO8 MDrDcuEFn9EU0j8nNT8Fz/BsFkFDS+Xd9NEsmuONgQaw2HHcAA+5gg1X1j8FDob72KQ5v+lPm8o zhsHj1jWVkZWwOsMLafVzqxVBkFL8CHzOEX5NREZw0j+Ws4mAO9JPDdpUmSQqggrgPbTmn+nUxB lfFaB6Z+b/hoqkg2QgDthn5eDeKt18v4sy6lLaHoblPICqUCDLfeZqrWwqKu8MFUuwX6vxiBfA= = X-Google-Smtp-Source: AGHT+IGDKKcjv7vMsdJwA+ytzXeUHGRBgZzIhnuF0iC5iRY16viFuyLaFxRGjWHbWk4GOWZjm+E1Kg== X-Received: by 2002:a05:6a00:138c:b0:736:b101:aed3 with SMTP id d2e1a72fcca58-7423bc1d5f4mr21080891b3a.1.1747133501960; Tue, 13 May 2025 03:51:41 -0700 (PDT) Received: from localhost.localdomain ([49.207.220.49]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a3d861sm7796759b3a.147.2025.05.13.03.51.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 May 2025 03:51:41 -0700 (PDT) From: vanusuri@mvista.com To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][kirkstone][PATCH 2/7] libsoup: Fix CVE-2025-32906 Date: Tue, 13 May 2025 16:21:24 +0530 Message-Id: <20250513105129.2284690-2-vanusuri@mvista.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250513105129.2284690-1-vanusuri@mvista.com> References: <20250513105129.2284690-1-vanusuri@mvista.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 13 May 2025 10:51:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/216412 From: Vijay Anusuri Upstream-Status: Backport from https://gitlab.gnome.org/GNOME/libsoup/-/commit/1f509f31b6f8420a3661c3f990424ab7b9164931 & https://gitlab.gnome.org/GNOME/libsoup/-/commit/af5b9a4a3945c52b940d5ac181ef51bb12011f1f Signed-off-by: Vijay Anusuri --- .../libsoup/libsoup/CVE-2025-32906-1.patch | 61 ++++++++++++++ .../libsoup/libsoup/CVE-2025-32906-2.patch | 83 +++++++++++++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 2 + 3 files changed, 146 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32906-1.patch create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32906-2.patch diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32906-1.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32906-1.patch new file mode 100644 index 0000000000..916a41a71f --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32906-1.patch @@ -0,0 +1,61 @@ +From 1f509f31b6f8420a3661c3f990424ab7b9164931 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Tue, 11 Feb 2025 14:36:26 -0600 +Subject: [PATCH] headers: Handle parsing edge case + +This version number is specifically crafted to pass sanity checks allowing it to go one byte out of bounds. + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/1f509f31b6f8420a3661c3f990424ab7b9164931] +CVE: CVE-2025-32906 #Dependency Patch +Signed-off-by: Vijay Anusuri +--- + libsoup/soup-headers.c | 2 +- + tests/header-parsing-test.c | 12 ++++++++++++ + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c +index 85385cea..9d6d00a3 100644 +--- a/libsoup/soup-headers.c ++++ b/libsoup/soup-headers.c +@@ -225,7 +225,7 @@ soup_headers_parse_request (const char *str, + !g_ascii_isdigit (version[5])) + return SOUP_STATUS_BAD_REQUEST; + major_version = strtoul (version + 5, &p, 10); +- if (*p != '.' || !g_ascii_isdigit (p[1])) ++ if (p + 1 >= str + len || *p != '.' || !g_ascii_isdigit (p[1])) + return SOUP_STATUS_BAD_REQUEST; + minor_version = strtoul (p + 1, &p, 10); + version_end = p; +diff --git a/tests/header-parsing-test.c b/tests/header-parsing-test.c +index 07ea2866..10ddb684 100644 +--- a/tests/header-parsing-test.c ++++ b/tests/header-parsing-test.c +@@ -6,6 +6,10 @@ typedef struct { + const char *name, *value; + } Header; + ++static char unterminated_http_version[] = { ++ 'G','E','T',' ','/',' ','H','T','T','P','/','1', '0', '0', '.' ++}; ++ + static struct RequestTest { + const char *description; + const char *bugref; +@@ -383,6 +387,14 @@ static struct RequestTest { + { { NULL } } + }, + ++ /* This couldn't be a C string as going one byte over would have been safe. */ ++ { "Long HTTP version terminating at missing minor version", "https://gitlab.gnome.org/GNOME/libsoup/-/issues/404", ++ unterminated_http_version, sizeof (unterminated_http_version), ++ SOUP_STATUS_BAD_REQUEST, ++ NULL, NULL, -1, ++ { { NULL } } ++ }, ++ + { "Non-HTTP request", NULL, + "GET / SOUP/1.1\r\nHost: example.com\r\n", -1, + SOUP_STATUS_BAD_REQUEST, +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32906-2.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32906-2.patch new file mode 100644 index 0000000000..5baad15648 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32906-2.patch @@ -0,0 +1,83 @@ +From af5b9a4a3945c52b940d5ac181ef51bb12011f1f Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Wed, 12 Feb 2025 11:30:02 -0600 +Subject: [PATCH] headers: Handle parsing only newlines + +Closes #404 +Closes #407 + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/af5b9a4a3945c52b940d5ac181ef51bb12011f1f] +CVE: CVE-2025-32906 +Signed-off-by: Vijay Anusuri +--- + libsoup/soup-headers.c | 4 ++-- + tests/header-parsing-test.c | 13 ++++++++++++- + 2 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c +index 9d6d00a3..52ef2ece 100644 +--- a/libsoup/soup-headers.c ++++ b/libsoup/soup-headers.c +@@ -186,7 +186,7 @@ soup_headers_parse_request (const char *str, + /* RFC 2616 4.1 "servers SHOULD ignore any empty line(s) + * received where a Request-Line is expected." + */ +- while ((*str == '\r' || *str == '\n') && len > 0) { ++ while (len > 0 && (*str == '\r' || *str == '\n')) { + str++; + len--; + } +@@ -371,7 +371,7 @@ soup_headers_parse_response (const char *str, + * after a response, which we then see prepended to the next + * response on that connection. + */ +- while ((*str == '\r' || *str == '\n') && len > 0) { ++ while (len > 0 && (*str == '\r' || *str == '\n')) { + str++; + len--; + } +diff --git a/tests/header-parsing-test.c b/tests/header-parsing-test.c +index 10ddb684..4faafbd6 100644 +--- a/tests/header-parsing-test.c ++++ b/tests/header-parsing-test.c +@@ -6,10 +6,15 @@ typedef struct { + const char *name, *value; + } Header; + ++/* These are not C strings to ensure going one byte over is not safe. */ + static char unterminated_http_version[] = { + 'G','E','T',' ','/',' ','H','T','T','P','/','1', '0', '0', '.' + }; + ++static char only_newlines[] = { ++ '\n', '\n', '\n', '\n' ++}; ++ + static struct RequestTest { + const char *description; + const char *bugref; +@@ -387,7 +392,6 @@ static struct RequestTest { + { { NULL } } + }, + +- /* This couldn't be a C string as going one byte over would have been safe. */ + { "Long HTTP version terminating at missing minor version", "https://gitlab.gnome.org/GNOME/libsoup/-/issues/404", + unterminated_http_version, sizeof (unterminated_http_version), + SOUP_STATUS_BAD_REQUEST, +@@ -457,6 +461,13 @@ static struct RequestTest { + SOUP_STATUS_BAD_REQUEST, + NULL, NULL, -1, + { { NULL } } ++ }, ++ ++ { "Only newlines", NULL, ++ only_newlines, sizeof (only_newlines), ++ SOUP_STATUS_BAD_REQUEST, ++ NULL, NULL, -1, ++ { { NULL } } + } + }; + static const int num_reqtests = G_N_ELEMENTS (reqtests); +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index 4b723d3150..a5b6c2f039 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb @@ -19,6 +19,8 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2024-52531-1.patch \ file://CVE-2024-52531-2.patch \ file://CVE-2024-52531-3.patch \ + file://CVE-2025-32906-1.patch \ + file://CVE-2025-32906-2.patch \ " SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8" From patchwork Tue May 13 10:51:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 62852 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5D36C3ABD9 for ; Tue, 13 May 2025 10:52:01 +0000 (UTC) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mx.groups.io with SMTP id smtpd.web10.72961.1747133517447546364 for ; Tue, 13 May 2025 03:51:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=VWrjOq+z; spf=pass (domain: mvista.com, ip: 209.85.215.179, mailfrom: vanusuri@mvista.com) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-b268e4bfd0dso3159699a12.2 for ; Tue, 13 May 2025 03:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1747133516; x=1747738316; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u62Cxxl4mgtX/mI9zGrHRd0U7K/rK8oCMQVMIUTggII=; b=VWrjOq+zXjSHI2vlfFjhwJ5sO+aYvinXLU/sgGzk79w5t++ecb8LJ6iuYapDJadVDJ 135/RPMeWDSKthg8hm7Lrn9CXuPar7JQ2AZVAzBNrCOyPEtiTNVIE2tWY0kQEFEbr4jH jS1V//Uhu08AxvPBiFAalAKe+Gjfd0Ock7UuY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747133516; x=1747738316; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u62Cxxl4mgtX/mI9zGrHRd0U7K/rK8oCMQVMIUTggII=; b=e0uyFcG8h1G4HvQnezhBPUqF/zo/51HTFPV5QycdQrg6L/HGUbAyBij2w+vfsvQR05 F7YC2nS3aCIUSg9O6fmZ5qjStXTMEMEWAOYkcWDXfvTkoyv7JY5vMSQVBQ+UEMEp2ZSy TjHgH0c/PxEL3LPTQ+2BkRsb/ocLlectJk1E0Z8ERrKoLDAoVkSmv97I02rp9Fg7DtNc +1lb/AzW74nywfERwGuaO2IGEqifFRMkTNNiNzbVDh0fT9b94kbP3IuCjL0ftPloc2GO ovLr4EkBsMiqBNbBTVXMJD0kl9r7hze0wqZQSsBV5E48sJVT1DSXQhH+o59pfKzLP6VT c6GQ== X-Gm-Message-State: AOJu0YxgmXkVYUwkknc2lEf4RnRpjCMr6HEWeKCzmsvrjiFsiw/q7oPT yGicsBRojR/6J3DsEzA0FRj9Jq/2vmvFR5G5yi+5eScQfAOplz3KEVelbwtSJP1vJOcdomplTUY NGTc= X-Gm-Gg: ASbGncu4cSpPy361yef2oA6VGapT4nSrMjLEWe0Iq49NEIE/J+vuUVohZvoHj6po/0d 82HKIfqi0GFX6bVdMnmJAMVXJgOe0AMmbIJO/MxMz7DVRJq2pj4/ZO+Dyc0rmbk1vgbnEh4E17g yjq8+lYb8WiWWyyLHp/ALmiGltYAEYIffZvvQnQK8iR/Cn8mqwtSXDiJTu3CidwAFYlXecGApgV 8MvpwlvbeMHHaB46R2eMo0whGmiWazJxaPt3R5h+Hl6F1GWQmCrPXjSYxXF0qtVDcBGcT7QGZ2i NqZb9ZCBW0znLe8Jg2mNQTTz7dHr+48kNId+1CpKgP9yY8wbCN3lmslwYOmLdrrWTzhonaZbBQ= = X-Google-Smtp-Source: AGHT+IGP6izHoVQ3uu0U+02DhNJh/LgbqG4MJ11bd8SiKc0iRFsCgpwmo1YwAYNR5KLUWbRJjmEPSg== X-Received: by 2002:a05:6a21:2d06:b0:1f5:8cc8:9cc5 with SMTP id adf61e73a8af0-215abcf3b47mr27861701637.34.1747133505304; Tue, 13 May 2025 03:51:45 -0700 (PDT) Received: from localhost.localdomain ([49.207.220.49]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a3d861sm7796759b3a.147.2025.05.13.03.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 May 2025 03:51:44 -0700 (PDT) From: vanusuri@mvista.com To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][kirkstone][PATCH 3/7] libsoup: Fix CVE-2025-32909 Date: Tue, 13 May 2025 16:21:25 +0530 Message-Id: <20250513105129.2284690-3-vanusuri@mvista.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250513105129.2284690-1-vanusuri@mvista.com> References: <20250513105129.2284690-1-vanusuri@mvista.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 13 May 2025 10:52:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/216416 From: Vijay Anusuri Upstream-Status: Backport from https://gitlab.gnome.org/GNOME/libsoup/-/comm it/ba4c3a6f988beff59e45801ab36067293d24ce92 Signed-off-by: Vijay Anusuri --- .../libsoup/libsoup/CVE-2025-32909.patch | 36 +++++++++++++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32909.patch diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32909.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32909.patch new file mode 100644 index 0000000000..8982da58f1 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32909.patch @@ -0,0 +1,36 @@ +From ba4c3a6f988beff59e45801ab36067293d24ce92 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Wed, 8 Jan 2025 16:30:17 -0600 +Subject: [PATCH] content-sniffer: Handle sniffing resource shorter than 4 + bytes + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/ba4c3a6f988beff59e45801ab36067293d24ce92] +CVE: CVE-2025-32909 +Signed-off-by: Vijay Anusuri +--- + libsoup/content-sniffer/soup-content-sniffer.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/libsoup/content-sniffer/soup-content-sniffer.c b/libsoup/content-sniffer/soup-content-sniffer.c +index 5a181ff1..aeee2e25 100644 +--- a/libsoup/content-sniffer/soup-content-sniffer.c ++++ b/libsoup/content-sniffer/soup-content-sniffer.c +@@ -243,9 +243,14 @@ sniff_mp4 (SoupContentSniffer *sniffer, GBytes *buffer) + gsize resource_length; + const char *resource = g_bytes_get_data (buffer, &resource_length); + resource_length = MIN (512, resource_length); +- guint32 box_size = *((guint32*)resource); ++ guint32 box_size; + guint i; + ++ if (resource_length < sizeof (guint32)) ++ return FALSE; ++ ++ box_size = *((guint32*)resource); ++ + #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + box_size = ((box_size >> 24) | + ((box_size << 8) & 0x00FF0000) | +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index a5b6c2f039..4fa8fce1c4 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb @@ -21,6 +21,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2024-52531-3.patch \ file://CVE-2025-32906-1.patch \ file://CVE-2025-32906-2.patch \ + file://CVE-2025-32909.patch \ " SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8" From patchwork Tue May 13 10:51:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 62851 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A936BC3ABD7 for ; Tue, 13 May 2025 10:51:51 +0000 (UTC) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mx.groups.io with SMTP id smtpd.web11.73390.1747133510024126693 for ; Tue, 13 May 2025 03:51:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=dP5b6w9+; spf=pass (domain: mvista.com, ip: 209.85.210.172, mailfrom: vanusuri@mvista.com) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-7399838db7fso5278215b3a.0 for ; Tue, 13 May 2025 03:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1747133509; x=1747738309; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VrwTuhznuFfW7w8dy0NfiokEgK2zu8Bb5nUUabxZYo4=; b=dP5b6w9+PlDVRSP6K2X8SiS6MeZiSjCZOKidT4cjgeYwWQ/ovolmfaJqngRJBbQMoh oaHne4AN8nB1th11bNQ1cbqywV5VQgcyVvB7fmYBJR4K4EyJibwbEREMhpcqtsgj4LtW LrfpoX5HyQbtUFnAz4oGoTgjp3gASXPU9l3jE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747133509; x=1747738309; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VrwTuhznuFfW7w8dy0NfiokEgK2zu8Bb5nUUabxZYo4=; b=s/FVuiIMdXq8ml6/ByYThIqxEIhGV9l6q2RnMVarA9cNJPKOOL2cICybq9fQUfRscD rZzcQ/thDyRCXdbBQiY3GbAm18klaY5bg4UctgXYWQUOyDNRdGuhvRRXRhBfrLfNnTWu 83JLk53UV/a9jlMhpHqOP4DnMLAmB2GewXE+gJoOKpyCSb4OHWinaIf+3zSczs9X8hNU OOjIFCDDv6VgYQHiIqoZ9MofHUJYqWkcewPoCZPTk0AfuU31rHWa1xuz2a7/p8AqjGBb wzX1EY9yIwRAES8ovfMbRfKqCMV+VxHKviKTZgIbYGRLu7wWUdmVSUm5Kt3x8dzlXJSl ZMqg== X-Gm-Message-State: AOJu0YyZIqGksuwGXDGjuIwfq1hatWsxvuBpB2ie/aKnQo1HGxsOQIQH wXf53mkw/pKcLgi0OMrrmKYCvAd/2uQCXQWMjpkUi9Y/17jbi/HawY0JAXQ2Jn7song2WwmzTg5 Xvm4= X-Gm-Gg: ASbGncvWiYPdyvxEgvriZloUPY6cy2gj4F7GGTs7TDpYQSEUu35NqVtZ7oPJhv5vEaX CfyV4Wav/Fk5UY6UrM4MH4FMwFfgK4Q8g63+XgUUYKja3x2GA2Gz6EaR29DgbAb7X0drXVPxowj BNzjZAoyNZqVCjR2aCFe6WzZeN5V3oI8lh2HSEJUStIdk24EsQS8fSLXM9D0+Trf//hjosVTOnK zPIoLKabzwnsPkv1U/I5gTpWrzJCEa2DJ/f/fwBld0bNVCtzVM3KrcQ/vlKuT5F1V3OUbEpV7OB ZbPUTBCgSBn5PsZnDADpWbTP9ZGASq5tDBySV7OG5u9m6uABFhScE7wL6sznKvI= X-Google-Smtp-Source: AGHT+IElXLzFmIHs3PVa+wSvuU10i3/xzqEVrObr0+yqYLJpkRrZr0nlzXeXC2p8zSjGIcT5G5GJ7g== X-Received: by 2002:a05:6a00:a14:b0:736:b400:b58f with SMTP id d2e1a72fcca58-74278d476c0mr4769807b3a.0.1747133508580; Tue, 13 May 2025 03:51:48 -0700 (PDT) Received: from localhost.localdomain ([49.207.220.49]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a3d861sm7796759b3a.147.2025.05.13.03.51.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 May 2025 03:51:48 -0700 (PDT) From: vanusuri@mvista.com To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][kirkstone][PATCH 4/7] libsoup: Fix CVE-2025-32910 Date: Tue, 13 May 2025 16:21:26 +0530 Message-Id: <20250513105129.2284690-4-vanusuri@mvista.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250513105129.2284690-1-vanusuri@mvista.com> References: <20250513105129.2284690-1-vanusuri@mvista.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 13 May 2025 10:51:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/216413 From: Vijay Anusuri Upstream-Status: Backport from https://gitlab.gnome.org/GNOME/libsoup/-/commit/e40df6d48a1cbab56f5d15016cc861a503423cfe & https://gitlab.gnome.org/GNOME/libsoup/-/commit/405a8a34597a44bd58c4759e7d5e23f02c3b556a & https://gitlab.gnome.org/GNOME/libsoup/-/commit/ea16eeacb052e423eb5c3b0b705e5eab34b13832 Signed-off-by: Vijay Anusuri --- .../libsoup/libsoup/CVE-2025-32910-1.patch | 98 ++++++++++++ .../libsoup/libsoup/CVE-2025-32910-2.patch | 149 ++++++++++++++++++ .../libsoup/libsoup/CVE-2025-32910-3.patch | 27 ++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 3 + 4 files changed, 277 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32910-1.patch create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32910-2.patch create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32910-3.patch diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32910-1.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32910-1.patch new file mode 100644 index 0000000000..27011f587f --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32910-1.patch @@ -0,0 +1,98 @@ +From e40df6d48a1cbab56f5d15016cc861a503423cfe Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Sun, 8 Dec 2024 20:00:35 -0600 +Subject: [PATCH] auth-digest: Handle missing realm in authenticate header + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/e40df6d48a1cbab56f5d15016cc861a503423cfe] +CVE: CVE-2025-32910 +Signed-off-by: Vijay Anusuri +--- + libsoup/auth/soup-auth-digest.c | 3 ++ + tests/auth-test.c | 50 +++++++++++++++++++++++++++++++++ + 2 files changed, 53 insertions(+) + +diff --git a/libsoup/auth/soup-auth-digest.c b/libsoup/auth/soup-auth-digest.c +index 2e81849af..4f12e87a5 100644 +--- a/libsoup/auth/soup-auth-digest.c ++++ b/libsoup/auth/soup-auth-digest.c +@@ -148,6 +148,9 @@ soup_auth_digest_update (SoupAuth *auth, SoupMessage *msg, + guint qop_options; + gboolean ok = TRUE; + ++ if (!soup_auth_get_realm (auth)) ++ return FALSE; ++ + g_free (priv->domain); + g_free (priv->nonce); + g_free (priv->opaque); +diff --git a/tests/auth-test.c b/tests/auth-test.c +index 158fdac10..3066e904a 100644 +--- a/tests/auth-test.c ++++ b/tests/auth-test.c +@@ -1866,6 +1866,55 @@ do_multiple_digest_algorithms (void) + soup_test_server_quit_unref (server); + } + ++static void ++on_request_read_for_missing_realm (SoupServer *server, ++ SoupServerMessage *msg, ++ gpointer user_data) ++{ ++ SoupMessageHeaders *response_headers = soup_server_message_get_response_headers (msg); ++ soup_message_headers_replace (response_headers, "WWW-Authenticate", "Digest qop=\"auth\""); ++} ++ ++static void ++do_missing_realm_test (void) ++{ ++ SoupSession *session; ++ SoupMessage *msg; ++ SoupServer *server; ++ SoupAuthDomain *digest_auth_domain; ++ gint status; ++ GUri *uri; ++ ++ server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); ++ soup_server_add_handler (server, NULL, ++ server_callback, NULL, NULL); ++ uri = soup_test_server_get_uri (server, "http", NULL); ++ ++ digest_auth_domain = soup_auth_domain_digest_new ( ++ "realm", "auth-test", ++ "auth-callback", server_digest_auth_callback, ++ NULL); ++ soup_auth_domain_add_path (digest_auth_domain, "/"); ++ soup_server_add_auth_domain (server, digest_auth_domain); ++ g_object_unref (digest_auth_domain); ++ ++ g_signal_connect (server, "request-read", ++ G_CALLBACK (on_request_read_for_missing_realm), ++ NULL); ++ ++ session = soup_test_session_new (NULL); ++ msg = soup_message_new_from_uri ("GET", uri); ++ g_signal_connect (msg, "authenticate", ++ G_CALLBACK (on_digest_authenticate), ++ NULL); ++ ++ status = soup_test_session_send_message (session, msg); ++ ++ g_assert_cmpint (status, ==, SOUP_STATUS_UNAUTHORIZED); ++ g_uri_unref (uri); ++ soup_test_server_quit_unref (server); ++} ++ + int + main (int argc, char **argv) + { +@@ -1899,6 +1948,7 @@ main (int argc, char **argv) + g_test_add_func ("/auth/auth-uri", do_auth_uri_test); + g_test_add_func ("/auth/cancel-request-on-authenticate", do_cancel_request_on_authenticate); + g_test_add_func ("/auth/multiple-algorithms", do_multiple_digest_algorithms); ++ g_test_add_func ("/auth/missing-realm", do_missing_realm_test); + + ret = g_test_run (); + +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32910-2.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32910-2.patch new file mode 100644 index 0000000000..b62e09cbdb --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32910-2.patch @@ -0,0 +1,149 @@ +From 405a8a34597a44bd58c4759e7d5e23f02c3b556a Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Thu, 26 Dec 2024 18:18:35 -0600 +Subject: [PATCH] auth-digest: Handle missing nonce + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/405a8a34597a44bd58c4759e7d5e23f02c3b556a] +CVE: CVE-2025-32910 +Signed-off-by: Vijay Anusuri +--- + libsoup/auth/soup-auth-digest.c | 45 +++++++++++++++++++++++++-------- + tests/auth-test.c | 19 ++++++++------ + 2 files changed, 46 insertions(+), 18 deletions(-) + +diff --git a/libsoup/auth/soup-auth-digest.c b/libsoup/auth/soup-auth-digest.c +index 4f12e87a..350bfde6 100644 +--- a/libsoup/auth/soup-auth-digest.c ++++ b/libsoup/auth/soup-auth-digest.c +@@ -138,6 +138,19 @@ soup_auth_digest_get_qop (SoupAuthDigestQop qop) + return g_string_free (out, FALSE); + } + ++static gboolean ++validate_params (SoupAuthDigest *auth_digest) ++{ ++ SoupAuthDigestPrivate *priv = soup_auth_digest_get_instance_private (auth_digest); ++ ++ if (priv->qop || priv->algorithm == SOUP_AUTH_DIGEST_ALGORITHM_MD5_SESS) { ++ if (!priv->nonce) ++ return FALSE; ++ } ++ ++ return TRUE; ++} ++ + static gboolean + soup_auth_digest_update (SoupAuth *auth, SoupMessage *msg, + GHashTable *auth_params) +@@ -175,16 +188,21 @@ soup_auth_digest_update (SoupAuth *auth, SoupMessage *msg, + if (priv->algorithm == -1) + ok = FALSE; + +- stale = g_hash_table_lookup (auth_params, "stale"); +- if (stale && !g_ascii_strcasecmp (stale, "TRUE") && *priv->hex_urp) +- recompute_hex_a1 (priv); +- else { +- g_free (priv->user); +- priv->user = NULL; +- g_free (priv->cnonce); +- priv->cnonce = NULL; +- memset (priv->hex_urp, 0, sizeof (priv->hex_urp)); +- memset (priv->hex_a1, 0, sizeof (priv->hex_a1)); ++ if (!validate_params (auth_digest)) ++ ok = FALSE; ++ ++ if (ok) { ++ stale = g_hash_table_lookup (auth_params, "stale"); ++ if (stale && !g_ascii_strcasecmp (stale, "TRUE") && *priv->hex_urp) ++ recompute_hex_a1 (priv); ++ else { ++ g_free (priv->user); ++ priv->user = NULL; ++ g_free (priv->cnonce); ++ priv->cnonce = NULL; ++ memset (priv->hex_urp, 0, sizeof (priv->hex_urp)); ++ memset (priv->hex_a1, 0, sizeof (priv->hex_a1)); ++ } + } + + return ok; +@@ -276,6 +294,8 @@ soup_auth_digest_compute_hex_a1 (const char *hex_urp, + + /* In MD5-sess, A1 is hex_urp:nonce:cnonce */ + ++ g_assert (nonce && cnonce); ++ + checksum = g_checksum_new (G_CHECKSUM_MD5); + g_checksum_update (checksum, (guchar *)hex_urp, strlen (hex_urp)); + g_checksum_update (checksum, (guchar *)":", 1); +@@ -366,6 +386,8 @@ soup_auth_digest_compute_response (const char *method, + if (qop) { + char tmp[9]; + ++ g_assert (cnonce); ++ + g_snprintf (tmp, 9, "%.8x", nc); + g_checksum_update (checksum, (guchar *)tmp, strlen (tmp)); + g_checksum_update (checksum, (guchar *)":", 1); +@@ -429,6 +451,9 @@ soup_auth_digest_get_authorization (SoupAuth *auth, SoupMessage *msg) + g_return_val_if_fail (uri != NULL, NULL); + url = soup_uri_get_path_and_query (uri); + ++ g_assert (priv->nonce); ++ g_assert (!priv->qop || priv->cnonce); ++ + soup_auth_digest_compute_response (soup_message_get_method (msg), url, priv->hex_a1, + priv->qop, priv->nonce, + priv->cnonce, priv->nc, +diff --git a/tests/auth-test.c b/tests/auth-test.c +index 3066e904..c651c7cd 100644 +--- a/tests/auth-test.c ++++ b/tests/auth-test.c +@@ -1867,16 +1867,17 @@ do_multiple_digest_algorithms (void) + } + + static void +-on_request_read_for_missing_realm (SoupServer *server, +- SoupServerMessage *msg, +- gpointer user_data) ++on_request_read_for_missing_params (SoupServer *server, ++ SoupServerMessage *msg, ++ gpointer user_data) + { ++ const char *auth_header = user_data; + SoupMessageHeaders *response_headers = soup_server_message_get_response_headers (msg); +- soup_message_headers_replace (response_headers, "WWW-Authenticate", "Digest qop=\"auth\""); ++ soup_message_headers_replace (response_headers, "WWW-Authenticate", auth_header); + } + + static void +-do_missing_realm_test (void) ++do_missing_params_test (gconstpointer auth_header) + { + SoupSession *session; + SoupMessage *msg; +@@ -1899,8 +1900,8 @@ do_missing_realm_test (void) + g_object_unref (digest_auth_domain); + + g_signal_connect (server, "request-read", +- G_CALLBACK (on_request_read_for_missing_realm), +- NULL); ++ G_CALLBACK (on_request_read_for_missing_params), ++ (gpointer)auth_header); + + session = soup_test_session_new (NULL); + msg = soup_message_new_from_uri ("GET", uri); +@@ -1948,7 +1949,9 @@ main (int argc, char **argv) + g_test_add_func ("/auth/auth-uri", do_auth_uri_test); + g_test_add_func ("/auth/cancel-request-on-authenticate", do_cancel_request_on_authenticate); + g_test_add_func ("/auth/multiple-algorithms", do_multiple_digest_algorithms); +- g_test_add_func ("/auth/missing-realm", do_missing_realm_test); ++ g_test_add_data_func ("/auth/missing-params/realm", "Digest qop=\"auth\"", do_missing_params_test); ++ g_test_add_data_func ("/auth/missing-params/nonce", "Digest realm=\"auth-test\", qop=\"auth,auth-int\", opaque=\"5ccc069c403ebaf9f0171e9517f40e41\"", do_missing_params_test); ++ g_test_add_data_func ("/auth/missing-params/nonce-md5-sess", "Digest realm=\"auth-test\", qop=\"auth,auth-int\", opaque=\"5ccc069c403ebaf9f0171e9517f40e41\" algorithm=\"MD5-sess\"", do_missing_params_test); + + ret = g_test_run (); + +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32910-3.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32910-3.patch new file mode 100644 index 0000000000..32e0c86e62 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32910-3.patch @@ -0,0 +1,27 @@ +From ea16eeacb052e423eb5c3b0b705e5eab34b13832 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Fri, 27 Dec 2024 13:52:52 -0600 +Subject: [PATCH] auth-digest: Fix leak + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/ea16eeacb052e423eb5c3b0b705e5eab34b13832] +CVE: CVE-2025-32910 +Signed-off-by: Vijay Anusuri +--- + libsoup/auth/soup-auth-digest.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libsoup/auth/soup-auth-digest.c b/libsoup/auth/soup-auth-digest.c +index 350bfde6..9eb7fa0e 100644 +--- a/libsoup/auth/soup-auth-digest.c ++++ b/libsoup/auth/soup-auth-digest.c +@@ -72,6 +72,7 @@ soup_auth_digest_finalize (GObject *object) + g_free (priv->nonce); + g_free (priv->domain); + g_free (priv->cnonce); ++ g_free (priv->opaque); + + memset (priv->hex_urp, 0, sizeof (priv->hex_urp)); + memset (priv->hex_a1, 0, sizeof (priv->hex_a1)); +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index 4fa8fce1c4..2c05ef338e 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb @@ -22,6 +22,9 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-32906-1.patch \ file://CVE-2025-32906-2.patch \ file://CVE-2025-32909.patch \ + file://CVE-2025-32910-1.patch \ + file://CVE-2025-32910-2.patch \ + file://CVE-2025-32910-3.patch \ " SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8" From patchwork Tue May 13 10:51:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 62855 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FFB1C3ABC3 for ; Tue, 13 May 2025 10:52:01 +0000 (UTC) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mx.groups.io with SMTP id smtpd.web10.72960.1747133512993203307 for ; Tue, 13 May 2025 03:51:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=MXrVX9dM; spf=pass (domain: mvista.com, ip: 209.85.210.177, mailfrom: vanusuri@mvista.com) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-7424ccbef4eso2858528b3a.2 for ; Tue, 13 May 2025 03:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1747133512; x=1747738312; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H+n6ujRDE8vFX1e0KHEstpioJViVh1aP94EgmnDSyw8=; b=MXrVX9dMzDBTxI9OtopayXlqCWZUyFjy7AjbrTECwoCW5RfEfPaFOVe6CwFpzCxggp vAxw60IEXT5utQ5PYCBlPo3nTyvUtnz1zcVBcFZ13tY+pTVmdouomzh2WiDTeTlWLOpA O9EfB9f+6LHak7a6rN7tUzgzGZn6dB6P15eEo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747133512; x=1747738312; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H+n6ujRDE8vFX1e0KHEstpioJViVh1aP94EgmnDSyw8=; b=OdjESa4iiIw7bxHt1aPXO+6S87TJ4zXMHwWIhj2s/kttdp7a6tTMk2q+fCo6SijpPD gxgfhg9C9E+RK/UUtbaj3rQJAlUI8bN/1MmB1e7EaUUuDYoIRkO+O5CP5k7AKrs/Y1S4 tP2eXgmmM1sV+BUnkuFCFTB82nWdBa/Mf4SmpqXvBnsEhNWHebKJMAPK1D3JS/wHQuEm T3Tf/gqdrroe9WlWimLavvy45MWNLDUW/5N+rCrbh9u5vqo80W20BULJOCJtGLeTMoKy PhPfZSt0YQCmNdEy02fviqFJ0REY6qK+b5ptclVU9qWMax8ud3CoeuD8u5s0tzIdDqIG tnKA== X-Gm-Message-State: AOJu0YySanZa9sEO/VS7+eeOwrgaya1kb5KZJqQ2lbUiOIVRVGThD3L5 jJNMpBmDRpa/jVRgwFSh5ahhPiZpWS+LEYrcgNdRN2W9jWOKEN4NWaA61KL05MuR+qmScKgPvv3 jr6A= X-Gm-Gg: ASbGnctMB9MgLo0FVBPbTSdHSTZQ08oA0Ir3YLPllgxB0Z58WjP3aV2TfLRPNoPwF/2 11eVOoF0Dltfx/I4Vh4IjJVOmtxs3pwHmGGzddzr95OFxam7CRuzrT6B5OMpZzvJdmh3/6tMUT2 9ub1xSRUm+YGhjBumDjIfdJ6SP5EuZqFfkefoXV3PoGibLT3Kw1aFB9OErE/FmZAyQSj3xgdUXE NFR+hgQz8o1av31IVrXRhyrEVJORE7fX0EwinnMkuNoRSVUxbJmNHwHXhys4b7mt2S5A5UMmC4k A3oE5SXcuXhKmtSzV+IFqlDNRBTlbNtfkZGr4H3AGIqiJx+AEnHqfze8plytxpc= X-Google-Smtp-Source: AGHT+IHrFJla/HAWj0KkWfNqA5hFB+O7Ij19QwILgqwQnJhcO4WIJzdqTZqlU+wtUhR1JE44vi9ZWQ== X-Received: by 2002:a05:6a00:a16:b0:732:5164:3cc with SMTP id d2e1a72fcca58-7423bffde33mr24712674b3a.19.1747133512005; Tue, 13 May 2025 03:51:52 -0700 (PDT) Received: from localhost.localdomain ([49.207.220.49]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a3d861sm7796759b3a.147.2025.05.13.03.51.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 May 2025 03:51:51 -0700 (PDT) From: vanusuri@mvista.com To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][kirkstone][PATCH 5/7] libsoup: Fix CVE-2025-32911 & CVE-2025-32913 Date: Tue, 13 May 2025 16:21:27 +0530 Message-Id: <20250513105129.2284690-5-vanusuri@mvista.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250513105129.2284690-1-vanusuri@mvista.com> References: <20250513105129.2284690-1-vanusuri@mvista.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 13 May 2025 10:52:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/216414 From: Vijay Anusuri Upstream-Status: Backport from https://gitlab.gnome.org/GNOME/libsoup/-/commit/7b4ef0e004ece3a308ccfaa714c284f4c96ade34 & https://gitlab.gnome.org/GNOME/libsoup/-/commit/f4a761fb66512fff59798765e8ac5b9e57dceef0 Signed-off-by: Vijay Anusuri --- .../CVE-2025-32911_CVE-2025-32913-1.patch | 72 +++++++++++++++++++ .../CVE-2025-32911_CVE-2025-32913-2.patch | 44 ++++++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 2 + 3 files changed, 118 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32911_CVE-2025-32913-1.patch create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32911_CVE-2025-32913-2.patch diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32911_CVE-2025-32913-1.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32911_CVE-2025-32913-1.patch new file mode 100644 index 0000000000..4e1d8212f5 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32911_CVE-2025-32913-1.patch @@ -0,0 +1,72 @@ +From 7b4ef0e004ece3a308ccfaa714c284f4c96ade34 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Fri, 27 Dec 2024 17:53:50 -0600 +Subject: [PATCH] soup_message_headers_get_content_disposition: Fix NULL deref + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/7b4ef0e004ece3a308ccfaa714c284f4c96ade34] +CVE: CVE-2025-32911 CVE-2025-32913 #Dependency Patch +Signed-off-by: Vijay Anusuri +--- + libsoup/soup-message-headers.c | 13 +++++++++---- + tests/header-parsing-test.c | 14 ++++++++++++++ + 2 files changed, 23 insertions(+), 4 deletions(-) + +diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c +index 56cc1e9d..04f4c302 100644 +--- a/libsoup/soup-message-headers.c ++++ b/libsoup/soup-message-headers.c +@@ -1660,10 +1660,15 @@ soup_message_headers_get_content_disposition (SoupMessageHeaders *hdrs, + */ + if (params && g_hash_table_lookup_extended (*params, "filename", + &orig_key, &orig_value)) { +- char *filename = strrchr (orig_value, '/'); +- +- if (filename) +- g_hash_table_insert (*params, g_strdup (orig_key), filename + 1); ++ if (orig_value) { ++ char *filename = strrchr (orig_value, '/'); ++ ++ if (filename) ++ g_hash_table_insert (*params, g_strdup (orig_key), filename + 1); ++ } else { ++ /* filename with no value isn't valid. */ ++ g_hash_table_remove (*params, "filename"); ++ } + } + return TRUE; + } +diff --git a/tests/header-parsing-test.c b/tests/header-parsing-test.c +index 5e423d2b..d0b360c8 100644 +--- a/tests/header-parsing-test.c ++++ b/tests/header-parsing-test.c +@@ -1039,6 +1039,7 @@ do_param_list_tests (void) + #define RFC5987_TEST_HEADER_FALLBACK "attachment; filename*=Unknown''t%FF%FF%FFst.txt; filename=\"test.txt\"" + #define RFC5987_TEST_HEADER_NO_TYPE "filename=\"test.txt\"" + #define RFC5987_TEST_HEADER_NO_TYPE_2 "filename=\"test.txt\"; foo=bar" ++#define RFC5987_TEST_HEADER_EMPTY_FILENAME ";filename" + + static void + do_content_disposition_tests (void) +@@ -1139,6 +1140,19 @@ do_content_disposition_tests (void) + g_assert_cmpstr (parameter2, ==, "bar"); + g_hash_table_destroy (params); + ++ /* Empty filename */ ++ soup_message_headers_clear (hdrs); ++ soup_message_headers_append (hdrs, "Content-Disposition", ++ RFC5987_TEST_HEADER_EMPTY_FILENAME); ++ if (!soup_message_headers_get_content_disposition (hdrs, ++ &disposition, ++ ¶ms)) { ++ soup_test_assert (FALSE, "empty filename decoding FAILED"); ++ return; ++ } ++ g_assert_false (g_hash_table_contains (params, "filename")); ++ g_hash_table_destroy (params); ++ + soup_message_headers_unref (hdrs); + + /* Ensure that soup-multipart always quotes filename */ +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32911_CVE-2025-32913-2.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32911_CVE-2025-32913-2.patch new file mode 100644 index 0000000000..5d9f33c736 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32911_CVE-2025-32913-2.patch @@ -0,0 +1,44 @@ +From f4a761fb66512fff59798765e8ac5b9e57dceef0 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Fri, 27 Dec 2024 18:00:39 -0600 +Subject: [PATCH] soup_message_headers_get_content_disposition: strdup + truncated filenames + +This table frees the strings it contains. + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/f4a761fb66512fff59798765e8ac5b9e57dceef0] +CVE: CVE-2025-32911 CVE-2025-32913 +Signed-off-by: Vijay Anusuri +--- + libsoup/soup-message-headers.c | 2 +- + tests/header-parsing-test.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c +index 04f4c302..ee7a3cb1 100644 +--- a/libsoup/soup-message-headers.c ++++ b/libsoup/soup-message-headers.c +@@ -1664,7 +1664,7 @@ soup_message_headers_get_content_disposition (SoupMessageHeaders *hdrs, + char *filename = strrchr (orig_value, '/'); + + if (filename) +- g_hash_table_insert (*params, g_strdup (orig_key), filename + 1); ++ g_hash_table_insert (*params, g_strdup (orig_key), g_strdup (filename + 1)); + } else { + /* filename with no value isn't valid. */ + g_hash_table_remove (*params, "filename"); +diff --git a/tests/header-parsing-test.c b/tests/header-parsing-test.c +index d0b360c8..07ea2866 100644 +--- a/tests/header-parsing-test.c ++++ b/tests/header-parsing-test.c +@@ -1150,6 +1150,7 @@ do_content_disposition_tests (void) + soup_test_assert (FALSE, "empty filename decoding FAILED"); + return; + } ++ g_free (disposition); + g_assert_false (g_hash_table_contains (params, "filename")); + g_hash_table_destroy (params); + +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index 2c05ef338e..f5877c3419 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb @@ -25,6 +25,8 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-32910-1.patch \ file://CVE-2025-32910-2.patch \ file://CVE-2025-32910-3.patch \ + file://CVE-2025-32911_CVE-2025-32913-1.patch \ + file://CVE-2025-32911_CVE-2025-32913-2.patch \ " SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8" From patchwork Tue May 13 10:51:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 62853 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1628C3ABC9 for ; Tue, 13 May 2025 10:52:01 +0000 (UTC) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mx.groups.io with SMTP id smtpd.web11.73392.1747133516284802080 for ; Tue, 13 May 2025 03:51:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=QAaldMA3; spf=pass (domain: mvista.com, ip: 209.85.210.176, mailfrom: vanusuri@mvista.com) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-7410c18bb00so6269068b3a.3 for ; Tue, 13 May 2025 03:51:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1747133515; x=1747738315; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wDZa7pik10N1bkpX2WDOrF+G2GxIiEdNUuHr9phAYgw=; b=QAaldMA3FqLea4gHY6zXVv0+TEThbsmm6kUWCjKSNOWkaghnaxCF7VAruI54vQMhzp A/YcI7hZhhJHjqivSQXF5X4jgmBEmOcIYEJg+zuaquqLZ35R1KMkRIvKVOiA4emOb19R g35n0HvtR7HNiaSHyChelxKVHeCRbUhdDyHAg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747133515; x=1747738315; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wDZa7pik10N1bkpX2WDOrF+G2GxIiEdNUuHr9phAYgw=; b=IClx/0fwoATGF/PdW0OUxYzOOQKesweqk0ixacwgdO7k8/sdw+Zz9FQ1hr7vrw7gXY ao4IoL/YP+lWoDvt2Z/HzPFYEcTB2kK7DfRlIUlR1or9pD4liHCPRlEjklA62v59fj2r 0DHkAuyD7xw5w7kZimLzWL1oU36vyDJyrP5g+ftAgq7OkfFxMGvQbyM8OfuEhnOeuurc GmomIhnPqhGzgbWV15C747saRQjuhRUFpgSPr2KwARLnsGIqDoO11XDzlV0I78Ah2jGX 60dVmpHdwgfd1XVk8JQqPQFpAQSMQ9Ee7/Zu9zE1+OQSadPVFOYU4RO8rV8/Bc4ixovJ R1nw== X-Gm-Message-State: AOJu0YzfwA5nZIdgU7rNL4DM++1vL+aa0fBtHgiHk1Qe9AjKRh3VdBEK 49j9cCvHBSm6eAZQ29WicJ6c5JI4hiP1LMkIrhHrV7bfSra0XhOcvg7y0wUJRGP/cODdpFnMw38 9iaI= X-Gm-Gg: ASbGncsH+LyNFo85YbXVJoXY0xNmd30453zvOnVbyvLhz6WVYd4VAU2e6ujnLrGJIT7 KpPhdBKEu4ZhLxGcHko56Qa83zKc1XomRWvXl22a5xP+NZidVJ2dM6bFWnAoArN6VeRZJwEg6WP mZE0M3we3abd+ZHXOX2DU8iaJkSHG+YRtwPEd3srxtyce37oonw03v4WyeZ/eUVCUyLcHE2OBzL i/efEx/EX60TAqT0noKL+LYS94MVdFjx4hsEsQ87hNEiSoFAd95T/DY1uFPvzzId6qxk+FFW/LW 0OeIWoHoAsoIpFtMucQ8VhJdRxzrWwcyTsUr626HDaYzm+qmWgL2CFn8nJHoPL0= X-Google-Smtp-Source: AGHT+IEtoSqLLbJKRB2C/qRFccBIqSR7soYNAsnIywXtBZwJrJGjkl4EPB2dPVHdLfgenwvIkrVJ2A== X-Received: by 2002:a05:6a00:190f:b0:740:9a42:a356 with SMTP id d2e1a72fcca58-7423bd5544cmr23168242b3a.11.1747133515204; Tue, 13 May 2025 03:51:55 -0700 (PDT) Received: from localhost.localdomain ([49.207.220.49]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a3d861sm7796759b3a.147.2025.05.13.03.51.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 May 2025 03:51:54 -0700 (PDT) From: vanusuri@mvista.com To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][kirkstone][PATCH 6/7] libsoup: Fix CVE-2025-32912 Date: Tue, 13 May 2025 16:21:28 +0530 Message-Id: <20250513105129.2284690-6-vanusuri@mvista.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250513105129.2284690-1-vanusuri@mvista.com> References: <20250513105129.2284690-1-vanusuri@mvista.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 13 May 2025 10:52:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/216415 From: Vijay Anusuri Upstream-Status: Backport from https://gitlab.gnome.org/GNOME/libsoup/-/commit/cd077513f267e43ce4b659eb18a1734d8a369992 & https://gitlab.gnome.org/GNOME/libsoup/-/commit/910ebdcd3dd82386717a201c13c834f3a63eed7f Signed-off-by: Vijay Anusuri --- .../libsoup/libsoup/CVE-2025-32912-1.patch | 41 +++++++++++++++++++ .../libsoup/libsoup/CVE-2025-32912-2.patch | 30 ++++++++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 2 + 3 files changed, 73 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32912-1.patch create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32912-2.patch diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32912-1.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32912-1.patch new file mode 100644 index 0000000000..c35c599502 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32912-1.patch @@ -0,0 +1,41 @@ +From cd077513f267e43ce4b659eb18a1734d8a369992 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Wed, 5 Feb 2025 14:03:05 -0600 +Subject: [PATCH] auth-digest: Handle missing nonce + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/cd077513f267e43ce4b659eb18a1734d8a369992] +CVE: CVE-2025-32912 +Signed-off-by: Vijay Anusuri +--- + libsoup/auth/soup-auth-digest.c | 2 +- + tests/auth-test.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libsoup/auth/soup-auth-digest.c b/libsoup/auth/soup-auth-digest.c +index 9eb7fa0e..d69a4013 100644 +--- a/libsoup/auth/soup-auth-digest.c ++++ b/libsoup/auth/soup-auth-digest.c +@@ -162,7 +162,7 @@ soup_auth_digest_update (SoupAuth *auth, SoupMessage *msg, + guint qop_options; + gboolean ok = TRUE; + +- if (!soup_auth_get_realm (auth)) ++ if (!soup_auth_get_realm (auth) || !g_hash_table_contains (auth_params, "nonce")) + return FALSE; + + g_free (priv->domain); +diff --git a/tests/auth-test.c b/tests/auth-test.c +index c651c7cd..484097f1 100644 +--- a/tests/auth-test.c ++++ b/tests/auth-test.c +@@ -1952,6 +1952,7 @@ main (int argc, char **argv) + g_test_add_data_func ("/auth/missing-params/realm", "Digest qop=\"auth\"", do_missing_params_test); + g_test_add_data_func ("/auth/missing-params/nonce", "Digest realm=\"auth-test\", qop=\"auth,auth-int\", opaque=\"5ccc069c403ebaf9f0171e9517f40e41\"", do_missing_params_test); + g_test_add_data_func ("/auth/missing-params/nonce-md5-sess", "Digest realm=\"auth-test\", qop=\"auth,auth-int\", opaque=\"5ccc069c403ebaf9f0171e9517f40e41\" algorithm=\"MD5-sess\"", do_missing_params_test); ++ g_test_add_data_func ("/auth/missing-params/nonce-and-qop", "Digest realm=\"auth-test\"", do_missing_params_test); + + ret = g_test_run (); + +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32912-2.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32912-2.patch new file mode 100644 index 0000000000..ad6f3a8028 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32912-2.patch @@ -0,0 +1,30 @@ +From 910ebdcd3dd82386717a201c13c834f3a63eed7f Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Sat, 8 Feb 2025 12:30:13 -0600 +Subject: [PATCH] digest-auth: Handle NULL nonce + +`contains` only handles a missing nonce, `lookup` handles both missing and empty. + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/910ebdcd3dd82386717a201c13c834f3a63eed7f] +CVE: CVE-2025-32912 +Signed-off-by: Vijay Anusuri +--- + libsoup/auth/soup-auth-digest.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libsoup/auth/soup-auth-digest.c b/libsoup/auth/soup-auth-digest.c +index d69a4013..dc4dbfc5 100644 +--- a/libsoup/auth/soup-auth-digest.c ++++ b/libsoup/auth/soup-auth-digest.c +@@ -162,7 +162,7 @@ soup_auth_digest_update (SoupAuth *auth, SoupMessage *msg, + guint qop_options; + gboolean ok = TRUE; + +- if (!soup_auth_get_realm (auth) || !g_hash_table_contains (auth_params, "nonce")) ++ if (!soup_auth_get_realm (auth) || !g_hash_table_lookup (auth_params, "nonce")) + return FALSE; + + g_free (priv->domain); +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index f5877c3419..dbf437c42f 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb @@ -27,6 +27,8 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-32910-3.patch \ file://CVE-2025-32911_CVE-2025-32913-1.patch \ file://CVE-2025-32911_CVE-2025-32913-2.patch \ + file://CVE-2025-32912-1.patch \ + file://CVE-2025-32912-2.patch \ " SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8" From patchwork Tue May 13 10:51:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 62854 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF6B2C3ABD7 for ; Tue, 13 May 2025 10:52:01 +0000 (UTC) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mx.groups.io with SMTP id smtpd.web10.72962.1747133520291574943 for ; Tue, 13 May 2025 03:52:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=CwMc66Nb; spf=pass (domain: mvista.com, ip: 209.85.210.182, mailfrom: vanusuri@mvista.com) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-7423fadbe77so3879614b3a.3 for ; Tue, 13 May 2025 03:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1747133519; x=1747738319; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=f6PrZlRI6otvXxvG3NM2TXcXmdxNhA87VpVg2gvmR6I=; b=CwMc66NbtjJpKDTaPhlIcS+Yp/0kZXx1VnRlmN1+mDfHrJwVIrO1xQdiK5y+nkcOMy rhoIrN1oYIDNIC5/z6FjpaZlfjWIr2R7u1NGyC07os+bcpl1laNauW/D9khumxQmTDgV FTAHYw3RQ7aiT7OFrsoWJmjgRUWkIL2LPL7G0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747133519; x=1747738319; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f6PrZlRI6otvXxvG3NM2TXcXmdxNhA87VpVg2gvmR6I=; b=A8Gm7jWVUFno2m+/lDsBxhPaSGjAMQMkJ2evCViRBzdAHHjlVWhe9F/FkECGMCNQoj S8kY52Axy6GqUW64x0hSBNsT3ejNGaKwg5hWTyvL8cr2g4UeU1ZiD2Y/tVisH1FiF4tz Vvm3efvEVJAxDf3eCu1yXkWDVYFFXGWfWA1fLAL8BWy1s1G+x6Ye/zEk/4Dooxm+UU/b GN8tRj+ETfbMZuzNwRM1oPat7MxdjLTa0KYwK9to//5s0Inuyja8pGbS9ki5YeF1QsGr Sp+ut7dzlQpqdOrAhBOY/0DOI3CebB0zvJzKd8d/N3AWo9uC3P+QpP6mgLkr1B1VGQM0 e/sg== X-Gm-Message-State: AOJu0YzZToeUccUhggaUh+jC/0nagiFpy2z4GqRqzP+i3JvaLD1ggLAm F9ZbPPPWLWb5x8Z7gcTMg3Rhv7HPus7T87R4cpc+TzD11WxXKeaEAqRs4yk7EsxtQTbCJ05yoWR FXFw= X-Gm-Gg: ASbGnctfNv8DY9D9BhD4PuZv3nxrs32TANT/nrLLe/bMoHV1naLgv00zi4itV8tG435 WSV+alGg81SLV5KEwYgiQTv8LzAo5JqgBxZbOtm/Uvegug4C2zrY6TPn981HLtZ9VVmKhwIyRo4 Ddx7cb35SK6fx1/3arbp9yZcaEc/6PI/uhbRt9jL48EXqNVmpB7QLCCvx6EgixVOnqxjCwceS+0 L9ZJzYqjeOsEx/soUr7bSuwOHU3AR1TmyM+nyaEsKBy7O3p6fl+CRTbwlP7KZ2zUCE4zNWo+XVP Ikl/eKUzHz2puD7l0A2gMPgLBwS0KR2pP8suwN4X21cD4ry4evbn89bNabkIQbA= X-Google-Smtp-Source: AGHT+IHKCxKo40S2G9jPeVTdUNH7a+srPq1ECJhZStNIvaEF/qJzL/O9TavKGjAZ5ira2Zi353cwUQ== X-Received: by 2002:a05:6a20:7d9e:b0:1fd:f4df:9a89 with SMTP id adf61e73a8af0-215abb3ba50mr19328082637.25.1747133519359; Tue, 13 May 2025 03:51:59 -0700 (PDT) Received: from localhost.localdomain ([49.207.220.49]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a3d861sm7796759b3a.147.2025.05.13.03.51.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 May 2025 03:51:58 -0700 (PDT) From: vanusuri@mvista.com To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][kirkstone][PATCH 7/7] libsoup: Fix CVE-2025-32914 Date: Tue, 13 May 2025 16:21:29 +0530 Message-Id: <20250513105129.2284690-7-vanusuri@mvista.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250513105129.2284690-1-vanusuri@mvista.com> References: <20250513105129.2284690-1-vanusuri@mvista.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 13 May 2025 10:52:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/216417 From: Vijay Anusuri Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/5bfcf8157597f2d327050114fb37ff600004dbcf] Signed-off-by: Vijay Anusuri --- .../libsoup/libsoup/CVE-2025-32914.patch | 111 ++++++++++++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 1 + 2 files changed, 112 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32914.patch diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32914.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32914.patch new file mode 100644 index 0000000000..0ada9f3134 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32914.patch @@ -0,0 +1,111 @@ +From 5bfcf8157597f2d327050114fb37ff600004dbcf Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Tue, 15 Apr 2025 09:03:00 +0200 +Subject: [PATCH] multipart: Fix read out of buffer bounds under + soup_multipart_new_from_message() + +This is CVE-2025-32914, special crafted input can cause read out of buffer bounds +of the body argument. + +Closes #436 + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/5bfcf8157597f2d327050114fb37ff600004dbcf] +CVE: CVE-2025-32914 +Signed-off-by: Vijay Anusuri +--- + libsoup/soup-multipart.c | 2 +- + tests/multipart-test.c | 58 ++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 59 insertions(+), 1 deletion(-) + +diff --git a/libsoup/soup-multipart.c b/libsoup/soup-multipart.c +index 2421c91f8..102ce3722 100644 +--- a/libsoup/soup-multipart.c ++++ b/libsoup/soup-multipart.c +@@ -173,7 +173,7 @@ soup_multipart_new_from_message (SoupMessageHeaders *headers, + return NULL; + } + +- split = strstr (start, "\r\n\r\n"); ++ split = g_strstr_len (start, body_end - start, "\r\n\r\n"); + if (!split || split > end) { + soup_multipart_free (multipart); + return NULL; +diff --git a/tests/multipart-test.c b/tests/multipart-test.c +index 2c0e7e969..f5b986889 100644 +--- a/tests/multipart-test.c ++++ b/tests/multipart-test.c +@@ -471,6 +471,62 @@ test_multipart (gconstpointer data) + loop = NULL; + } + ++static void ++test_multipart_bounds_good (void) ++{ ++ #define TEXT "line1\r\nline2" ++ SoupMultipart *multipart; ++ SoupMessageHeaders *headers, *set_headers = NULL; ++ GBytes *bytes, *set_bytes = NULL; ++ const char *raw_data = "--123\r\nContent-Type: text/plain;\r\n\r\n" TEXT "\r\n--123--\r\n"; ++ gboolean success; ++ ++ headers = soup_message_headers_new (SOUP_MESSAGE_HEADERS_MULTIPART); ++ soup_message_headers_append (headers, "Content-Type", "multipart/mixed; boundary=\"123\""); ++ ++ bytes = g_bytes_new (raw_data, strlen (raw_data)); ++ ++ multipart = soup_multipart_new_from_message (headers, bytes); ++ ++ g_assert_nonnull (multipart); ++ g_assert_cmpint (soup_multipart_get_length (multipart), ==, 1); ++ success = soup_multipart_get_part (multipart, 0, &set_headers, &set_bytes); ++ g_assert_true (success); ++ g_assert_nonnull (set_headers); ++ g_assert_nonnull (set_bytes); ++ g_assert_cmpint (strlen (TEXT), ==, g_bytes_get_size (set_bytes)); ++ g_assert_cmpstr ("text/plain", ==, soup_message_headers_get_content_type (set_headers, NULL)); ++ g_assert_cmpmem (TEXT, strlen (TEXT), g_bytes_get_data (set_bytes, NULL), g_bytes_get_size (set_bytes)); ++ ++ soup_message_headers_unref (headers); ++ g_bytes_unref (bytes); ++ ++ soup_multipart_free (multipart); ++ ++ #undef TEXT ++} ++ ++static void ++test_multipart_bounds_bad (void) ++{ ++ SoupMultipart *multipart; ++ SoupMessageHeaders *headers; ++ GBytes *bytes; ++ const char *raw_data = "--123\r\nContent-Type: text/plain;\r\nline1\r\nline2\r\n--123--\r\n"; ++ ++ headers = soup_message_headers_new (SOUP_MESSAGE_HEADERS_MULTIPART); ++ soup_message_headers_append (headers, "Content-Type", "multipart/mixed; boundary=\"123\""); ++ ++ bytes = g_bytes_new (raw_data, strlen (raw_data)); ++ ++ /* it did read out of raw_data/bytes bounds */ ++ multipart = soup_multipart_new_from_message (headers, bytes); ++ g_assert_null (multipart); ++ ++ soup_message_headers_unref (headers); ++ g_bytes_unref (bytes); ++} ++ + int + main (int argc, char **argv) + { +@@ -498,6 +554,8 @@ main (int argc, char **argv) + g_test_add_data_func ("/multipart/sync", GINT_TO_POINTER (SYNC_MULTIPART), test_multipart); + g_test_add_data_func ("/multipart/async", GINT_TO_POINTER (ASYNC_MULTIPART), test_multipart); + g_test_add_data_func ("/multipart/async-small-reads", GINT_TO_POINTER (ASYNC_MULTIPART_SMALL_READS), test_multipart); ++ g_test_add_func ("/multipart/bounds-good", test_multipart_bounds_good); ++ g_test_add_func ("/multipart/bounds-bad", test_multipart_bounds_bad); + + ret = g_test_run (); + +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index dbf437c42f..87ffb34f7d 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb @@ -29,6 +29,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-32911_CVE-2025-32913-2.patch \ file://CVE-2025-32912-1.patch \ file://CVE-2025-32912-2.patch \ + file://CVE-2025-32914.patch \ " SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8"