]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
libsoup: fix CVE-2025-32052
authorChangqing Li <changqing.li@windriver.com>
Fri, 6 Jun 2025 06:49:53 +0000 (14:49 +0800)
committerSteve Sakoman <steve@sakoman.com>
Fri, 6 Jun 2025 16:32:30 +0000 (09:32 -0700)
Refer:
https://gitlab.gnome.org/GNOME/libsoup/-/issues/425

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32052.patch [new file with mode: 0644]
meta/recipes-support/libsoup/libsoup_3.4.4.bb

diff --git a/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32052.patch b/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32052.patch
new file mode 100644 (file)
index 0000000..78b7120
--- /dev/null
@@ -0,0 +1,31 @@
+From 779bcb279b1dc4eb8bcb22c5e727b1174630c3fc Mon Sep 17 00:00:00 2001
+From: Patrick Griffis <pgriffis@igalia.com>
+Date: Sat, 16 Nov 2024 12:07:30 -0600
+Subject: [PATCH] Fix heap buffer overflow in soup_content_sniffer_sniff
+
+Co-Author: Ar Jun <pkillarjun@protonmail.com>
+
+CVE: CVE-2025-32052
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/f182429e5b1fc034050510da20c93256c4fa9652]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ libsoup/content-sniffer/soup-content-sniffer.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libsoup/content-sniffer/soup-content-sniffer.c b/libsoup/content-sniffer/soup-content-sniffer.c
+index 23d5aaa..aeee2e2 100644
+--- a/libsoup/content-sniffer/soup-content-sniffer.c
++++ b/libsoup/content-sniffer/soup-content-sniffer.c
+@@ -529,7 +529,7 @@ sniff_unknown (SoupContentSniffer *sniffer, GBytes *buffer,
+                       guint index_pattern = 0;
+                       gboolean skip_row = FALSE;
+-                      while ((index_stream < resource_length) &&
++                      while ((index_stream < resource_length - 1) &&
+                              (index_pattern <= type_row->pattern_length)) {
+                               /* Skip insignificant white space ("WS" in the spec) */
+                               if (type_row->pattern[index_pattern] == ' ') {
+-- 
+2.34.1
+
index ff0ae0afad1c39842a2093c1fa9cfb2fbcab2398..e7dccb63802317496645bc6e2ab24de4dce4845d 100644 (file)
@@ -37,6 +37,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \
            file://CVE-2025-32907-1.patch \
            file://CVE-2025-32907-2.patch \
            file://CVE-2025-32053.patch \
+           file://CVE-2025-32052.patch \
 "
 SRC_URI[sha256sum] = "291c67725f36ed90ea43efff25064b69c5a2d1981488477c05c481a3b4b0c5aa"