diff options
author | Ashish Sharma <asharma@mvista.com> | 2025-05-19 11:38:16 +0530 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-05-28 08:46:32 -0700 |
commit | 0f58759f1bf4e0ec165872d1b07aeb4816862c71 (patch) | |
tree | 400ebc31752be84cf8b3fed7b18e804a80c88883 | |
parent | 23a840550950d2424d3f49937dea4f5066ba709e (diff) | |
download | poky-0f58759f1bf4e0ec165872d1b07aeb4816862c71.tar.gz |
libsoup-2.4: Fix CVE-2025-46420
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/c9083869ec2a3037e6df4bd86b45c419ba295f8e]
(From OE-Core rev: f0d5d13b0b7b2cf3f60c85b0c135fd948c648256)
Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-46420.patch | 60 | ||||
-rw-r--r-- | meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb | 1 |
2 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-46420.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-46420.patch new file mode 100644 index 0000000000..37ab16dc05 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-46420.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From c9083869ec2a3037e6df4bd86b45c419ba295f8e Mon Sep 17 00:00:00 2001 | ||
2 | From: Patrick Griffis <pgriffis@igalia.com> | ||
3 | Date: Thu, 26 Dec 2024 18:31:42 -0600 | ||
4 | Subject: [PATCH] soup_header_parse_quality_list: Fix leak | ||
5 | |||
6 | When iterating over the parsed list we now steal the allocated strings that we want and then free_full the list which may contain remaining strings. | ||
7 | |||
8 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/c9083869ec2a3037e6df4bd86b45c419ba295f8e] | ||
9 | CVE: CVE-2025-46420 | ||
10 | Signed-off-by: Ashish Sharma <asharma@mvista.com> | ||
11 | |||
12 | libsoup/soup-headers.c | 11 +++++------ | ||
13 | 1 file changed, 5 insertions(+), 6 deletions(-) | ||
14 | |||
15 | diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c | ||
16 | index a5f7a7f6..85385cea 100644 | ||
17 | --- a/libsoup/soup-headers.c | ||
18 | +++ b/libsoup/soup-headers.c | ||
19 | @@ -530,7 +530,7 @@ soup_header_parse_quality_list (const char *header, GSList **unacceptable) | ||
20 | GSList *unsorted; | ||
21 | QualityItem *array; | ||
22 | GSList *sorted, *iter; | ||
23 | - char *item, *semi; | ||
24 | + char *semi; | ||
25 | const char *param, *equal, *value; | ||
26 | double qval; | ||
27 | int n; | ||
28 | @@ -543,9 +543,8 @@ soup_header_parse_quality_list (const char *header, GSList **unacceptable) | ||
29 | unsorted = soup_header_parse_list (header); | ||
30 | array = g_new0 (QualityItem, g_slist_length (unsorted)); | ||
31 | for (iter = unsorted, n = 0; iter; iter = iter->next) { | ||
32 | - item = iter->data; | ||
33 | qval = 1.0; | ||
34 | - for (semi = strchr (item, ';'); semi; semi = strchr (semi + 1, ';')) { | ||
35 | + for (semi = strchr (iter->data, ';'); semi; semi = strchr (semi + 1, ';')) { | ||
36 | param = skip_lws (semi + 1); | ||
37 | if (*param != 'q') | ||
38 | continue; | ||
39 | @@ -577,15 +576,15 @@ soup_header_parse_quality_list (const char *header, GSList **unacceptable) | ||
40 | if (qval == 0.0) { | ||
41 | if (unacceptable) { | ||
42 | *unacceptable = g_slist_prepend (*unacceptable, | ||
43 | - item); | ||
44 | + g_steal_pointer (&iter->data)); | ||
45 | } | ||
46 | } else { | ||
47 | - array[n].item = item; | ||
48 | + array[n].item = g_steal_pointer (&iter->data); | ||
49 | array[n].qval = qval; | ||
50 | n++; | ||
51 | } | ||
52 | } | ||
53 | - g_slist_free (unsorted); | ||
54 | + g_slist_free_full (unsorted, g_free); | ||
55 | |||
56 | qsort (array, n, sizeof (QualityItem), sort_by_qval); | ||
57 | sorted = NULL; | ||
58 | -- | ||
59 | GitLab | ||
60 | |||
diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb index 00f7fea41a..f04d9b2966 100644 --- a/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb +++ b/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb | |||
@@ -22,6 +22,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ | |||
22 | file://CVE-2025-32906-1.patch \ | 22 | file://CVE-2025-32906-1.patch \ |
23 | file://CVE-2025-32906-2.patch \ | 23 | file://CVE-2025-32906-2.patch \ |
24 | file://CVE-2025-32909.patch \ | 24 | file://CVE-2025-32909.patch \ |
25 | file://CVE-2025-46420.patch \ | ||
25 | " | 26 | " |
26 | SRC_URI[sha256sum] = "f0a427656e5fe19e1df71c107e88dfa1b2e673c25c547b7823b6018b40d01159" | 27 | SRC_URI[sha256sum] = "f0a427656e5fe19e1df71c107e88dfa1b2e673c25c547b7823b6018b40d01159" |
27 | 28 | ||