diff options
| -rw-r--r-- | meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-4969.patch | 54 |
1 files changed, 12 insertions, 42 deletions
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 index d45b2a2cb0..c1936b0b0c 100644 --- a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-4969.patch +++ b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-4969.patch | |||
| @@ -13,10 +13,20 @@ Closes https://gitlab.gnome.org/GNOME/libsoup/-/issues/447 | |||
| 13 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/07b94e27afafebf31ef3cd868866a1e383750086] | 13 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/07b94e27afafebf31ef3cd868866a1e383750086] |
| 14 | CVE: CVE-2025-4969 | 14 | CVE: CVE-2025-4969 |
| 15 | Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> | 15 | Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> |
| 16 | |||
| 17 | Refresh the patch, remove the test part, following commit in libsoup3 has a | ||
| 18 | type refactor, which make the test is not suitable for libsoup2 | ||
| 19 | [0d7e672e forms: Use GBytes instead of SoupMessageBody] | ||
| 20 | The test part will cause libsoup-2.3-native build failed on fedora40/41: | ||
| 21 | ../libsoup-2.74.3/tests/multipart-test.c:578:63: error: passing argument 2 of ‘soup_multipart_new_from_message’ from incompatible pointer type [-Wincompatible-pointer-types] | ||
| 22 | 578 | multipart = soup_multipart_new_from_message (headers, bytes); | ||
| 23 | | ^~~~~ | ||
| 24 | | | | ||
| 25 | | GBytes * {aka struct _GBytes *} | ||
| 26 | |||
| 16 | --- | 27 | --- |
| 17 | libsoup/soup-multipart.c | 2 +- | 28 | libsoup/soup-multipart.c | 2 +- |
| 18 | tests/multipart-test.c | 22 ++++++++++++++++++++++ | 29 | 1 files changed, 1 insertions(+), 1 deletion(-) |
| 19 | 2 files changed, 23 insertions(+), 1 deletion(-) | ||
| 20 | 30 | ||
| 21 | diff --git a/libsoup/soup-multipart.c b/libsoup/soup-multipart.c | 31 | diff --git a/libsoup/soup-multipart.c b/libsoup/soup-multipart.c |
| 22 | index dd93973..b3611db 100644 | 32 | index dd93973..b3611db 100644 |
| @@ -31,46 +41,6 @@ index dd93973..b3611db 100644 | |||
| 31 | continue; | 41 | continue; |
| 32 | 42 | ||
| 33 | /* Check for "--" or "\r\n" after boundary */ | 43 | /* Check for "--" or "\r\n" after boundary */ |
| 34 | diff --git a/tests/multipart-test.c b/tests/multipart-test.c | ||
| 35 | index 834b181..980eb68 100644 | ||
| 36 | --- a/tests/multipart-test.c | ||
| 37 | +++ b/tests/multipart-test.c | ||
| 38 | @@ -562,6 +562,27 @@ test_multipart_bounds_bad (void) | ||
| 39 | g_bytes_unref (bytes); | ||
| 40 | } | ||
| 41 | |||
| 42 | +static void | ||
| 43 | +test_multipart_bounds_bad_2 (void) | ||
| 44 | +{ | ||
| 45 | + SoupMultipart *multipart; | ||
| 46 | + SoupMessageHeaders *headers; | ||
| 47 | + GBytes *bytes; | ||
| 48 | + const char *raw_data = "\n--123\r\nline\r\n--123--\r"; | ||
| 49 | + | ||
| 50 | + headers = soup_message_headers_new (SOUP_MESSAGE_HEADERS_MULTIPART); | ||
| 51 | + soup_message_headers_append (headers, "Content-Type", "multipart/mixed; boundary=\"123\""); | ||
| 52 | + | ||
| 53 | + bytes = g_bytes_new (raw_data, strlen (raw_data)); | ||
| 54 | + | ||
| 55 | + multipart = soup_multipart_new_from_message (headers, bytes); | ||
| 56 | + g_assert_nonnull (multipart); | ||
| 57 | + | ||
| 58 | + soup_multipart_free (multipart); | ||
| 59 | + soup_message_headers_free (headers); | ||
| 60 | + g_bytes_unref (bytes); | ||
| 61 | +} | ||
| 62 | + | ||
| 63 | int | ||
| 64 | main (int argc, char **argv) | ||
| 65 | { | ||
| 66 | @@ -593,6 +614,7 @@ main (int argc, char **argv) | ||
| 67 | g_test_add_data_func ("/multipart/async-small-reads", GINT_TO_POINTER (ASYNC_MULTIPART_SMALL_READS), test_multipart); | ||
| 68 | g_test_add_func ("/multipart/bounds-good", test_multipart_bounds_good); | ||
| 69 | g_test_add_func ("/multipart/bounds-bad", test_multipart_bounds_bad); | ||
| 70 | + g_test_add_func ("/multipart/bounds-bad-2", test_multipart_bounds_bad_2); | ||
| 71 | |||
| 72 | ret = g_test_run (); | ||
| 73 | |||
| 74 | -- | 44 | -- |
| 75 | 2.49.0 | 45 | 2.49.0 |
| 76 | 46 | ||
