summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2025-06-03 17:21:04 +0800
committerSteve Sakoman <steve@sakoman.com>2025-06-11 08:17:34 -0700
commit24f024f0420db94c052121fec18342d84c05d325 (patch)
tree2881ac9ceb4c9534e63f8625a69c816a307a9bef
parent33fc8121c911bee69caf7f7a060793b11172f33a (diff)
downloadpoky-24f024f0420db94c052121fec18342d84c05d325.tar.gz
libsoup-2.4: fix CVE-2025-32907
Refer: https://gitlab.gnome.org/GNOME/libsoup/-/issues/428 (From OE-Core rev: de53b2272919b97719e2b7f704154283caebc59f) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32907.patch39
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb3
-rw-r--r--meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32907-1.patch14
-rw-r--r--meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32907-2.patch6
4 files changed, 51 insertions, 11 deletions
diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32907.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32907.patch
new file mode 100644
index 0000000000..41dd3ff3f4
--- /dev/null
+++ b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32907.patch
@@ -0,0 +1,39 @@
1From 8158b4084dcba2a233dfcb7359c53ab2840148f7 Mon Sep 17 00:00:00 2001
2From: Milan Crha <mcrha@redhat.com>
3Date: Tue, 15 Apr 2025 12:17:39 +0200
4Subject: [PATCH 1/2] soup-message-headers: Correct merge of ranges
5
6It had been skipping every second range, which generated an array
7of a lot of insane ranges, causing large memory usage by the server.
8
9Closes #428
10
11Part-of: <https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/452>
12
13CVE: CVE-2025-32907
14Upstream-Status: Backport
15[https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/452/diffs?commit_id=9bb92f7a685e31e10e9e8221d0342280432ce836]
16
17Test part not applied since test codes use some functions not in this
18version
19
20Signed-off-by: Changqing Li <changqing.li@windriver.com>
21---
22 libsoup/soup-message-headers.c | 1 +
23 1 files changed, 1 insertions(+)
24
25diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
26index 78b2455..00b9763 100644
27--- a/libsoup/soup-message-headers.c
28+++ b/libsoup/soup-message-headers.c
29@@ -1024,6 +1024,7 @@ soup_message_headers_get_ranges_internal (SoupMessageHeaders *hdrs,
30 if (cur->start <= prev->end) {
31 prev->end = MAX (prev->end, cur->end);
32 g_array_remove_index (array, i);
33+ i--;
34 }
35 }
36 }
37--
382.34.1
39
diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb
index df97a68b9c..c20069edef 100644
--- a/meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb
+++ b/meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb
@@ -32,7 +32,8 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \
32 file://CVE-2025-32912-2.patch \ 32 file://CVE-2025-32912-2.patch \
33 file://CVE-2025-32914.patch \ 33 file://CVE-2025-32914.patch \
34 file://CVE-2025-4969.patch \ 34 file://CVE-2025-4969.patch \
35 " 35 file://CVE-2025-32907.patch \
36"
36SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13" 37SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13"
37 38
38CVE_PRODUCT = "libsoup" 39CVE_PRODUCT = "libsoup"
diff --git a/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32907-1.patch b/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32907-1.patch
index 41b7d276a4..026a38c39a 100644
--- a/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32907-1.patch
+++ b/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32907-1.patch
@@ -1,4 +1,4 @@
1From 7507b0713c2f02af1cd561ebb99477e0a099419d Mon Sep 17 00:00:00 2001 1From 4741bc288ece52f5dbaebc568e72ce14da3e2757 Mon Sep 17 00:00:00 2001
2From: Milan Crha <mcrha@redhat.com> 2From: Milan Crha <mcrha@redhat.com>
3Date: Tue, 15 Apr 2025 12:17:39 +0200 3Date: Tue, 15 Apr 2025 12:17:39 +0200
4Subject: [PATCH 1/2] soup-message-headers: Correct merge of ranges 4Subject: [PATCH 1/2] soup-message-headers: Correct merge of ranges
@@ -22,10 +22,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
22 create mode 100644 tests/server-mem-limit-test.c 22 create mode 100644 tests/server-mem-limit-test.c
23 23
24diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c 24diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
25index ee7a3cb..f101d4b 100644 25index 95e2c31..d69d6e8 100644
26--- a/libsoup/soup-message-headers.c 26--- a/libsoup/soup-message-headers.c
27+++ b/libsoup/soup-message-headers.c 27+++ b/libsoup/soup-message-headers.c
28@@ -1244,6 +1244,7 @@ soup_message_headers_get_ranges_internal (SoupMessageHeaders *hdrs, 28@@ -1210,6 +1210,7 @@ soup_message_headers_get_ranges_internal (SoupMessageHeaders *hdrs,
29 if (cur->start <= prev->end) { 29 if (cur->start <= prev->end) {
30 prev->end = MAX (prev->end, cur->end); 30 prev->end = MAX (prev->end, cur->end);
31 g_array_remove_index (array, i); 31 g_array_remove_index (array, i);
@@ -34,17 +34,17 @@ index ee7a3cb..f101d4b 100644
34 } 34 }
35 } 35 }
36diff --git a/tests/meson.build b/tests/meson.build 36diff --git a/tests/meson.build b/tests/meson.build
37index ee118a0..8e7b51d 100644 37index 9bf88be..7ef7ac5 100644
38--- a/tests/meson.build 38--- a/tests/meson.build
39+++ b/tests/meson.build 39+++ b/tests/meson.build
40@@ -102,6 +102,7 @@ tests = [ 40@@ -93,6 +93,7 @@ tests = [
41 {'name': 'samesite'}, 41 {'name': 'samesite'},
42 {'name': 'session'}, 42 {'name': 'session'},
43 {'name': 'server-auth'}, 43 {'name': 'server-auth'},
44+ {'name': 'server-mem-limit'}, 44+ {'name': 'server-mem-limit'},
45 {'name': 'server'}, 45 {'name': 'server'},
46 {'name': 'sniffing', 46 {'name': 'sniffing'},
47 'depends': [test_resources], 47 {'name': 'ssl',
48diff --git a/tests/server-mem-limit-test.c b/tests/server-mem-limit-test.c 48diff --git a/tests/server-mem-limit-test.c b/tests/server-mem-limit-test.c
49new file mode 100644 49new file mode 100644
50index 0000000..98f1c40 50index 0000000..98f1c40
diff --git a/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32907-2.patch b/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32907-2.patch
index 9c838a55af..c1b6a1feba 100644
--- a/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32907-2.patch
+++ b/meta/recipes-support/libsoup/libsoup-3.4.4/CVE-2025-32907-2.patch
@@ -1,4 +1,4 @@
1From f31dfc357ffdd8d18d3593a06cd4acb888eaba70 Mon Sep 17 00:00:00 2001 1From 85716d2769b3e1acda024d2c7cbfb68139c5d90b Mon Sep 17 00:00:00 2001
2From: Milan Crha <mcrha@redhat.com> 2From: Milan Crha <mcrha@redhat.com>
3Date: Tue, 13 May 2025 14:20:46 +0200 3Date: Tue, 13 May 2025 14:20:46 +0200
4Subject: [PATCH 2/2] server-mem-limit-test: Limit memory usage only when not 4Subject: [PATCH 2/2] server-mem-limit-test: Limit memory usage only when not
@@ -21,10 +21,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
21 2 files changed, 13 insertions(+), 4 deletions(-) 21 2 files changed, 13 insertions(+), 4 deletions(-)
22 22
23diff --git a/meson.build b/meson.build 23diff --git a/meson.build b/meson.build
24index d4110da..74323ea 100644 24index 73a9fa0..a9531a4 100644
25--- a/meson.build 25--- a/meson.build
26+++ b/meson.build 26+++ b/meson.build
27@@ -357,6 +357,10 @@ configinc = include_directories('.') 27@@ -374,6 +374,10 @@ configinc = include_directories('.')
28 28
29 prefix = get_option('prefix') 29 prefix = get_option('prefix')
30 30