libsoup-2.4: fix build failure
PATCH 1/2 libsoup-2.4: fix build failure
From: Changqing Li <[email protected]>
Backport 2 patches to fix build failures
Signed-off-by Changqing Li <[email protected]>
--- ...-Fix-possibly-uninitialized-warnings.patch | 43 ++++++ ...-http-and-https-aliases-support-test.patch | 145 ++++++++++++++++++ .../libsoup/libsoup-2.4_2.74.3.bb | 5 +- 3 files changed, 192 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/0001-Fix-possibly-uninitialized-warnings.patch create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/0001-Remove-http-and-https-aliases-support-test.patch
meta/recipes-support/libsoup/libsoup-2.4/0001-Fix-possibly-uninitialized-warnings.patch new file +43 -0
@@ -0,0 +1,43 @@ +From 1159686379184a1c899eabb2174258aba5e0fd79 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis <[email protected]> +Date: Mon, 20 Sep 2021 15:41:31 -0500 +Subject: [PATCH] Fix possibly uninitialized warnings + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/fb98e9a8c3062c75357b961543af091de2dd5459] + +Signed-off-by: Changqing Li <[email protected]> +--- + libsoup/soup-websocket-connection.c | 2 +- + tests/samesite-test.c | 3 +++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/libsoup/soup-websocket-connection.c b/libsoup/soup-websocket-connection.c +index 65c1492..585d45c 100644 +--- a/libsoup/soup-websocket-connection.c ++++ b/libsoup/soup-websocket-connection.c +@@ -471,7 +471,7 @@ send_message (SoupWebsocketConnection *self, + GByteArray *bytes; + gsize frame_len; + guint8 *outer; +- guint8 mask_offset; ++ guint8 mask_offset = 0; + GBytes *filtered_bytes; + GList *l; + GError *error = NULL; +diff --git a/tests/samesite-test.c b/tests/samesite-test.c +index 0b081b2..60c9b8e 100644 +--- a/tests/samesite-test.c ++++ b/tests/samesite-test.c +@@ -60,6 +60,9 @@ assert_highest_policy_visible (GSList *cookies, SoupSameSitePolicy policy) + case SOUP_SAME_SITE_POLICY_NONE: + expected_count = 1; + break; ++ default: ++ g_assert_not_reached (); ++ break; + } + + g_assert_cmpuint (size, ==, expected_count); +-- +2.34.1 +
meta/recipes-support/libsoup/libsoup-2.4/0001-Remove-http-and-https-aliases-support-test.patch new file +145 -0
145 lines not on this page · raw message
meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb +4 -1
@@ -13,7 +13,10 @@ SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch \ - file://0001-CVE-2025-32911.patch" + file://0001-CVE-2025-32911.patch \ + file://0001-Fix-possibly-uninitialized-warnings.patch \ + file://0001-Remove-http-and-https-aliases-support-test.patch" + SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13" CVE_PRODUCT = "libsoup"
Signature · 1 line
2.34.1
PATCH 2/2 libsoup-2.4: fix CVE-2024-52532
From: Changqing Li <[email protected]>
CVE-2024-52532:
GNOME libsoup before 3.6.1 has an infinite loop, and memory consumption. during the reading of certain patterns of WebSocket data from clients.
Refer:
https://nvd.nist.gov/vuln/detail/CVE-2024-52532
Signed-off-by Changqing Li <[email protected]>
--- .../libsoup-2.4/CVE-2024-52532-1.patch | 37 ++++++++++++++ .../libsoup-2.4/CVE-2024-52532-2.patch | 43 +++++++++++++++++ .../libsoup-2.4/CVE-2024-52532-3.patch | 48 +++++++++++++++++++ .../libsoup/libsoup-2.4_2.74.3.bb | 5 +- 4 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-1.patch create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-2.patch create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-3.patch
meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-1.patch new file +37 -0
@@ -0,0 +1,37 @@ +From a693d49bff058fc20a448dc4e7d324ff0dc6597e Mon Sep 17 00:00:00 2001 +From: Ignacio Casal Quinteiro <[email protected]> +Date: Wed, 11 Sep 2024 11:52:11 +0200 +Subject: [PATCH 1/3] websocket: process the frame as soon as we read data + +Otherwise we can enter in a read loop because we were not +validating the data until the all the data was read. + +Fixes #391 + +CVE: CVE-2024-52532 +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/6adc0e3eb74c257ed4e2a23eb4b2774fdb0d67be#f1d67ca0386b145ea201cf88d27f72724d7c6715] + +Signed-off-by: Changqing Li <[email protected]> +--- + libsoup/soup-websocket-connection.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/libsoup/soup-websocket-connection.c b/libsoup/soup-websocket-connection.c +index a4095e1..65c1492 100644 +--- a/libsoup/soup-websocket-connection.c ++++ b/libsoup/soup-websocket-connection.c +@@ -1140,9 +1140,8 @@ soup_websocket_connection_read (SoupWebsocketConnection *self) + } + + pv->incoming->len = len + count; +- } while (count > 0); +- +- process_incoming (self); ++ process_incoming (self); ++ } while (count > 0 && !pv->close_sent && !pv->io_closing); + + if (end) { + if (!pv->close_sent || !pv->close_received) { +-- +2.34.1 +
meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-2.patch new file +43 -0
43 lines not on this page · raw message
meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-3.patch new file +48 -0
48 lines not on this page · raw message
meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb +4 -1
@@ -15,7 +15,10 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch \ file://0001-CVE-2025-32911.patch \ file://0001-Fix-possibly-uninitialized-warnings.patch \ - file://0001-Remove-http-and-https-aliases-support-test.patch" + file://0001-Remove-http-and-https-aliases-support-test.patch \ + file://CVE-2024-52532-1.patch \ + file://CVE-2024-52532-2.patch \ + file://CVE-2024-52532-3.patch" SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13"
Signature · 1 line
2.34.1