diff options
author | Vijay Anusuri <vanusuri@mvista.com> | 2025-06-13 11:14:54 +0530 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-06-20 08:06:29 -0700 |
commit | bb706cfe48f1113a3980d1d70a65117da3e96b48 (patch) | |
tree | 4a679cf06b2b0deeee99e57ce14fc61dfc41231c | |
parent | cecdcf3428ce035a07edf5c26573bac085b3cdc1 (diff) | |
download | poky-bb706cfe48f1113a3980d1d70a65117da3e96b48.tar.gz |
libsoup: Fix CVE-2025-46420
Upstream-Status: Backport
[https://gitlab.gnome.org/GNOME/libsoup/-/commit/c9083869ec2a3037e6df4bd86b45c419ba295f8e]
(From OE-Core rev: cb3a01ba6535b129608fb8d07261069f1fb4b84a)
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/recipes-support/libsoup/libsoup/CVE-2025-46420.patch | 60 | ||||
-rw-r--r-- | meta/recipes-support/libsoup/libsoup_3.0.7.bb | 1 |
2 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-46420.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-46420.patch new file mode 100644 index 0000000000..dbaec12f7d --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/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: Vijay Anusuri <vanusuri@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_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index a90f683cb8..67aa180612 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb | |||
@@ -35,6 +35,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ | |||
35 | file://CVE-2025-32050.patch \ | 35 | file://CVE-2025-32050.patch \ |
36 | file://CVE-2025-32052.patch \ | 36 | file://CVE-2025-32052.patch \ |
37 | file://CVE-2025-32053.patch \ | 37 | file://CVE-2025-32053.patch \ |
38 | file://CVE-2025-46420.patch \ | ||
38 | " | 39 | " |
39 | SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8" | 40 | SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8" |
40 | 41 | ||