]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
libsoup-2.4: fix CVE-2025-32053
authorChangqing Li <changqing.li@windriver.com>
Tue, 3 Jun 2025 09:21:06 +0000 (17:21 +0800)
committerSteve Sakoman <steve@sakoman.com>
Tue, 3 Jun 2025 15:57:58 +0000 (08:57 -0700)
Refer:
https://gitlab.gnome.org/GNOME/libsoup/-/issues/426

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

diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32053.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32053.patch
new file mode 100644 (file)
index 0000000..0d829d6
--- /dev/null
@@ -0,0 +1,39 @@
+From d9bcffd6cd5e8ec32889a594f7348d67a5101b3a Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 12 May 2025 13:58:42 +0800
+Subject: [PATCH] Fix heap buffer overflow in
+ soup-content-sniffer.c:sniff_feed_or_html()
+
+CVE: CVE-2025-32053
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/eaed42ca8d40cd9ab63764e3d63641180505f40a]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ libsoup/soup-content-sniffer.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libsoup/soup-content-sniffer.c b/libsoup/soup-content-sniffer.c
+index 967ec61..5f2896e 100644
+--- a/libsoup/soup-content-sniffer.c
++++ b/libsoup/soup-content-sniffer.c
+@@ -620,7 +620,7 @@ skip_insignificant_space (const char *resource, int *pos, int resource_length)
+              (resource[*pos] == '\x0D')) {
+               *pos = *pos + 1;
+-              if (*pos > resource_length)
++              if (*pos >= resource_length)
+                       return TRUE;
+       }
+@@ -682,7 +682,7 @@ sniff_feed_or_html (SoupContentSniffer *sniffer, SoupBuffer *buffer)
+               do {
+                       pos++;
+-                      if (pos > resource_length)
++                      if ((pos + 1) > resource_length)
+                               goto text_html;
+               } while (resource[pos] != '>');
+-- 
+2.34.1
+
index c20069edefc1256ba6ce9bef277b5a81e51fc075..9a2778bf924fa22a01ccca62120afb3cc7789219 100644 (file)
@@ -33,6 +33,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \
            file://CVE-2025-32914.patch \
            file://CVE-2025-4969.patch \
            file://CVE-2025-32907.patch \
+           file://CVE-2025-32053.patch \
 "
 SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13"