diff options
| author | Ashish Sharma <asharma@mvista.com> | 2025-05-19 11:08:05 +0530 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-05-27 09:38:57 -0700 |
| commit | 79babbe58a43e7c2c71aaadcfc4dad3a1faf1a5d (patch) | |
| tree | adaf20b59acc44cf710d5c19de34d8833114bb98 | |
| parent | 4ff1ba9c72b2a73f792cb706711e8596f5f2657b (diff) | |
| download | poky-79babbe58a43e7c2c71aaadcfc4dad3a1faf1a5d.tar.gz | |
libsoup-2.4: Fix CVE-2025-46420
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/c9083869ec2a3037e6df4bd86b45c419ba295f8e]
(From OE-Core rev: 7c963f68cb8dfdea3e1664078037303ea3f29e65)
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.3.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.3.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb index 3aaa06a541..fa4dece0e9 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 | |||
| @@ -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] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13" | 27 | SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13" |
| 27 | 28 | ||
