diff options
| author | Changqing Li <changqing.li@windriver.com> | 2025-06-06 14:49:57 +0800 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-06-13 08:58:00 -0700 |
| commit | 8944014e5c79eda65d53d234846d615e2c5098f6 (patch) | |
| tree | 991be620b66833024fb76e7ac6f1ec0340ce557f | |
| parent | e4ebf3effd8125761f9dfd88ad290db6cae99971 (diff) | |
| download | poky-8944014e5c79eda65d53d234846d615e2c5098f6.tar.gz | |
libsoup-2.4: fix CVE-2025-46421
Refer:
https://gitlab.gnome.org/GNOME/libsoup/-/issues/439
(From OE-Core rev: 9e32f4fd761b591ea2f5ce26381135e9a8db94ce)
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-46421.patch | 47 | ||||
| -rw-r--r-- | meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-46421.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-46421.patch new file mode 100644 index 0000000000..26067c4bb8 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-46421.patch | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | From 5eb225f02bb35de56cfeedd87bde716bf1cb750b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Patrick Griffis <pgriffis@igalia.com> | ||
| 3 | Date: Wed, 5 Feb 2025 16:18:10 -0600 | ||
| 4 | Subject: [PATCH] session: Strip authentication credentails on | ||
| 5 | cross-origin redirect | ||
| 6 | |||
| 7 | This should match the behavior of Firefox and Safari but not of Chromium. | ||
| 8 | |||
| 9 | CVE: CVE-2025-46421 | ||
| 10 | Upstream-Status: Backport | ||
| 11 | [https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/436/diffs?commit_id=3e5c26415811f19e7737238bb23305ffaf96f66b] | ||
| 12 | |||
| 13 | Test code not added since it included some headers not in version 2.74.3 | ||
| 14 | |||
| 15 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
| 16 | --- | ||
| 17 | libsoup/soup-session.c | 8 +++++++- | ||
| 18 | 1 files changed, 7 insertions(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c | ||
| 21 | index 83421ef..8d6ac61 100644 | ||
| 22 | --- a/libsoup/soup-session.c | ||
| 23 | +++ b/libsoup/soup-session.c | ||
| 24 | @@ -1189,12 +1189,18 @@ soup_session_redirect_message (SoupSession *session, SoupMessage *msg) | ||
| 25 | SOUP_ENCODING_NONE); | ||
| 26 | } | ||
| 27 | |||
| 28 | + /* Strip all credentials on cross-origin redirect. */ | ||
| 29 | + if (!soup_uri_host_equal (soup_message_get_uri (msg), new_uri)) { | ||
| 30 | + soup_message_headers_remove (msg->request_headers, "Authorization"); | ||
| 31 | + soup_message_set_auth (msg, NULL); | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | soup_message_set_uri (msg, new_uri); | ||
| 35 | soup_uri_free (new_uri); | ||
| 36 | |||
| 37 | soup_session_requeue_message (session, msg); | ||
| 38 | return TRUE; | ||
| 39 | -} | ||
| 40 | +} | ||
| 41 | |||
| 42 | static void | ||
| 43 | redirect_handler (SoupMessage *msg, gpointer user_data) | ||
| 44 | |||
| 45 | -- | ||
| 46 | 2.34.1 | ||
| 47 | |||
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 a4a8a03152..4a00dafe47 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 | |||
| @@ -36,6 +36,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ | |||
| 36 | file://CVE-2025-32053.patch \ | 36 | file://CVE-2025-32053.patch \ |
| 37 | file://CVE-2025-32052.patch \ | 37 | file://CVE-2025-32052.patch \ |
| 38 | file://CVE-2025-32050.patch \ | 38 | file://CVE-2025-32050.patch \ |
| 39 | file://CVE-2025-46421.patch \ | ||
| 39 | " | 40 | " |
| 40 | SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13" | 41 | SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13" |
| 41 | 42 | ||
