]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
libsoup-2.4: fix CVE-2025-4969
authorChangqing Li <changqing.li@windriver.com>
Tue, 3 Jun 2025 05:20:36 +0000 (13:20 +0800)
committerSteve Sakoman <steve@sakoman.com>
Mon, 9 Jun 2025 14:48:57 +0000 (07:48 -0700)
Refer:
https://gitlab.gnome.org/GNOME/libsoup/-/issues/447

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-4969.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-4969.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-4969.patch
new file mode 100644 (file)
index 0000000..7bc3e8d
--- /dev/null
@@ -0,0 +1,37 @@
+From a7d0c58608ed830bedfb6b92aea11e00feb55aa9 Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha@redhat.com>
+Date: Mon, 19 May 2025 17:48:27 +0200
+Subject: [PATCH] soup-multipart: Verify array bounds before accessing its
+ members
+
+The boundary could be at a place which, calculated, pointed
+before the beginning of the array. Check the bounds, to avoid
+read out of the array bounds.
+
+Closes https://gitlab.gnome.org/GNOME/libsoup/-/issues/447
+
+CVE: CVE-2025-4969
+Upstream-Status: Backport
+[https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/467/diffs?commit_id=b5b4dd10d4810f0c87b4eaffe88504f06e502f33]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ libsoup/soup-multipart.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libsoup/soup-multipart.c b/libsoup/soup-multipart.c
+index ce2fc10..a29cdf0 100644
+--- a/libsoup/soup-multipart.c
++++ b/libsoup/soup-multipart.c
+@@ -108,7 +108,7 @@ find_boundary (const char *start, const char *end,
+                       continue;
+               /* Check that it's at start of line */
+-              if (!(b == start || (b[-1] == '\n' && b[-2] == '\r')))
++              if (!(b == start || (b - start >= 2 && b[-1] == '\n' && b[-2] == '\r')))
+                       continue;
+               /* Check for "--" or "\r\n" after boundary */
+-- 
+2.34.1
+
index 911d95901e5d3521fa190c80d93d398157563ac5..e005e7200e3b358edce5042ba502bde663bc51e3 100644 (file)
@@ -36,6 +36,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \
            file://CVE-2025-4476.patch \
            file://CVE-2025-32907.patch \
            file://CVE-2025-4948.patch \
+           file://CVE-2025-4969.patch \
 "
 SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13"