diff options
| author | Changqing Li <changqing.li@windriver.com> | 2025-06-13 14:54:30 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-06-13 13:11:24 -0700 |
| commit | bc1ee46fc93cab79c033910facafd3b978b83292 (patch) | |
| tree | 29d849325b026ac08a96fb3f0b808a0224918cd7 | |
| parent | 03da2fde24ce2d92f954638336ab8ea36be0cdd8 (diff) | |
| download | meta-openembedded-bc1ee46fc93cab79c033910facafd3b978b83292.tar.gz | |
libsoup-2.4: fix CVE-2025-46421
Refer:
https://gitlab.gnome.org/GNOME/libsoup/-/issues/439
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2025-46421.patch | 47 | ||||
| -rw-r--r-- | meta-oe/recipes-support/libsoup/libsoup-2.4_2.74.3.bb | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2025-46421.patch b/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2025-46421.patch new file mode 100644 index 0000000000..3318093400 --- /dev/null +++ b/meta-oe/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 | 2 files changed, 85 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-oe/recipes-support/libsoup/libsoup-2.4_2.74.3.bb b/meta-oe/recipes-support/libsoup/libsoup-2.4_2.74.3.bb index 7d9cc222f5..aaeb515585 100644 --- a/meta-oe/recipes-support/libsoup/libsoup-2.4_2.74.3.bb +++ b/meta-oe/recipes-support/libsoup/libsoup-2.4_2.74.3.bb | |||
| @@ -25,6 +25,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ | |||
| 25 | file://CVE-2025-32906.patch \ | 25 | file://CVE-2025-32906.patch \ |
| 26 | file://CVE-2025-32914.patch \ | 26 | file://CVE-2025-32914.patch \ |
| 27 | file://CVE-2025-46420.patch \ | 27 | file://CVE-2025-46420.patch \ |
| 28 | file://CVE-2025-46421.patch \ | ||
| 28 | " | 29 | " |
| 29 | SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13" | 30 | SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13" |
| 30 | 31 | ||
