Skip to contentSkip to conversation

libsoup-2.4: fix CVE-2025-32914

PATCH Superseded [email protected] 1 participant 2 messages Jun 6, 2025 2 messages not in the archive

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#1 lore raw

PATCH v2 1/1 libsoup-2.4: fix CVE-2025-32914

In reply to a message not in the archive

From: Changqing Li <[email protected]>

Refer:
https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/450

---
 .../libsoup/libsoup-2.4/CVE-2025-32914.patch  | 35 +++++++++++++++++++
 .../libsoup/libsoup-2.4_2.74.3.bb             |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32914.patch
meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32914.patch new file +35 -0
new file mode 100644
index 0000000000..9f3bb21a25
@@ -0,0 +1,35 @@
+From ac844b9fc7945c38ea21fb7cf1a49a5c226d7c9c Mon Sep 17 00:00:00 2001
+From: Changqing Li <[email protected]>
+Date: Mon, 12 May 2025 16:17:20 +0800
+Subject: [PATCH] Resolve "(CVE-2025-32914) (#YWH-PGM9867-23) OOB Read on
+ libsoup through function "soup_multipart_new_from_message" in
+ soup-multipart.c leads to crash or exit of process"
+
+CVE: CVE-2025-32914
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/450/diffs?commit_id=5bfcf8157597f2d327050114fb37ff600004dbcf]
+
+Test code are not added since some functions not aligned with version
+2.74.3
+
+Signed-off-by: Changqing Li <[email protected]>
+---
+ libsoup/soup-multipart.c |  2 +-
+ 1 files changed, 1 insertions(+), 1 deletion(-)
+
+diff --git a/libsoup/soup-multipart.c b/libsoup/soup-multipart.c
+index a7e550f..dd93973 100644
+--- a/libsoup/soup-multipart.c
++++ b/libsoup/soup-multipart.c
+@@ -181,7 +181,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);
+ 			soup_buffer_free (flattened);
+ 
+-- 
+2.34.1
+
meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb +1 -0
index 79ffa19c20..7c1de29fd5 100644
@@ -21,6 +21,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \
            file://CVE-2025-2784.patch \
            file://CVE-2024-52530.patch \
            file://CVE-2025-32906.patch \
+           file://CVE-2025-32914.patch \
 "
 SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13"
 
Signature · 1 line
2.34.1
#3 lore raw
In reply to a message not in the archive

Hi, Steve

I noticed that this series already in openembedded-core-contrib, branch stable/walnascar-nut.

I need to update two patches,  this one, and another one is: [OE-core] [walnascar][PATCH V2] libsoup-2.4: fix CVE-2025-46421

Could you please help to update these two patches,  thanks.

//Changqing

Quoted 74 lines · Changqing Li via lists.openembedded.org

From: Changqing Li<[email protected]>

Refer:
https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/450

---
  .../libsoup/libsoup-2.4/CVE-2025-32914.patch  | 35 +++++++++++++++++++
  .../libsoup/libsoup-2.4_2.74.3.bb             |  1 +
  2 files changed, 36 insertions(+)

create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32914.patch

meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32914.patch new file +35 -0
new file mode 100644
index 0000000000..9f3bb21a25
@@ -0,0 +1,35 @@
+From ac844b9fc7945c38ea21fb7cf1a49a5c226d7c9c Mon Sep 17 00:00:00 2001
+From: Changqing Li<[email protected]>
+Date: Mon, 12 May 2025 16:17:20 +0800
+Subject: [PATCH] Resolve "(CVE-2025-32914) (#YWH-PGM9867-23) OOB Read on
+ libsoup through function "soup_multipart_new_from_message" in
+ soup-multipart.c leads to crash or exit of process"
+
+CVE: CVE-2025-32914
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/450/diffs?commit_id=5bfcf8157597f2d327050114fb37ff600004dbcf]
+
+Test code are not added since some functions not aligned with version
+2.74.3
+
+Signed-off-by: Changqing Li<[email protected]>
+---
+ libsoup/soup-multipart.c |  2 +-
+ 1 files changed, 1 insertions(+), 1 deletion(-)
+
+diff --git a/libsoup/soup-multipart.c b/libsoup/soup-multipart.c
+index a7e550f..dd93973 100644
+--- a/libsoup/soup-multipart.c
++++ b/libsoup/soup-multipart.c
+@@ -181,7 +181,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);
+ 			soup_buffer_free (flattened);
+
+--
+2.34.1
+
meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb +1 -1
index 79ffa19c20..7c1de29fd5 100644
@@ -21,6 +21,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \
             file://CVE-2025-2784.patch  \
             file://CVE-2024-52530.patch  \
             file://CVE-2025-32906.patch  \
+file://CVE-2025-32914.patch  \
  "
  SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13"
 
 
-=-=-=-=-=-=-=-=-=-=-=-

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