Skip to content

Commit 9360fd9

Browse files
Merge PR "[AUTO-CHERRYPICK] [AutoPR- Security] Patch libsoup for CVE-2025-11021 [HIGH] - branch main" microsoft#14979
Co-authored-by: Azure Linux Security Servicing Account <[email protected]>
1 parent 6cdbd68 commit 9360fd9

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

SPECS/libsoup/CVE-2025-11021.patch

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
From 8f1e56bbb5a192892e026de3c4ee8914aa120d69 Mon Sep 17 00:00:00 2001
2+
From: Alynx Zhou <[email protected]>
3+
Date: Sat, 11 Oct 2025 15:52:47 +0800
4+
Subject: [PATCH] cookies: Avoid expires attribute if date is invalid
5+
6+
According to CVE-2025-11021, we may get invalid on processing date
7+
string with timezone offset, this commit will ignore it.
8+
9+
Closes #459
10+
11+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
12+
Upstream-reference: https://gitlab.gnome.org/GNOME/libsoup/-/commit/9e1a427d2f047439d0320defe1593e6352595788.patch
13+
---
14+
libsoup/cookies/soup-cookie.c | 9 +++++----
15+
libsoup/soup-date-utils.c | 3 +++
16+
2 files changed, 8 insertions(+), 4 deletions(-)
17+
18+
diff --git a/libsoup/cookies/soup-cookie.c b/libsoup/cookies/soup-cookie.c
19+
index 021d527..093e451 100644
20+
--- a/libsoup/cookies/soup-cookie.c
21+
+++ b/libsoup/cookies/soup-cookie.c
22+
@@ -733,12 +733,13 @@ serialize_cookie (SoupCookie *cookie, GString *header, gboolean set_cookie)
23+
24+
if (cookie->expires) {
25+
char *timestamp;
26+
-
27+
- g_string_append (header, "; expires=");
28+
timestamp = soup_date_time_to_string (cookie->expires,
29+
SOUP_DATE_COOKIE);
30+
- g_string_append (header, timestamp);
31+
- g_free (timestamp);
32+
+ if (timestamp) {
33+
+ g_string_append (header, "; expires=");
34+
+ g_string_append (header, timestamp);
35+
+ g_free (timestamp);
36+
+ }
37+
}
38+
if (cookie->path) {
39+
g_string_append (header, "; path=");
40+
diff --git a/libsoup/soup-date-utils.c b/libsoup/soup-date-utils.c
41+
index 061057e..27fa8e3 100644
42+
--- a/libsoup/soup-date-utils.c
43+
+++ b/libsoup/soup-date-utils.c
44+
@@ -104,6 +104,9 @@ soup_date_time_to_string (GDateTime *date,
45+
char *date_format;
46+
char *formatted_date;
47+
48+
+ if (!utcdate)
49+
+ return NULL;
50+
+
51+
// We insert days/months ourselves to avoid locale specific formatting
52+
if (format == SOUP_DATE_HTTP) {
53+
/* "Sun, 06 Nov 1994 08:49:37 GMT" */
54+
--
55+
2.45.4
56+

SPECS/libsoup/libsoup.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Summary: libsoup HTTP client/server library
33
Name: libsoup
44
Version: %{BaseVersion}.4
5-
Release: 9%{?dist}
5+
Release: 10%{?dist}
66
License: GPLv2
77
Vendor: Microsoft Corporation
88
Distribution: Mariner
@@ -35,6 +35,7 @@ Patch16: CVE-2025-32912.patch
3535
Patch17: CVE-2025-4476.patch
3636
Patch18: CVE-2025-4948.patch
3737
Patch19: CVE-2025-4969.patch
38+
Patch20: CVE-2025-11021.patch
3839

3940

4041
BuildRequires: meson
@@ -147,6 +148,9 @@ find %{buildroot} -type f -name "*.la" -delete -print
147148
%defattr(-,root,root)
148149

149150
%changelog
151+
* Wed Oct 29 2025 Azure Linux Security Servicing Account <[email protected]> - 3.0.4-10
152+
- Patch for CVE-2025-11021
153+
150154
* Tue Aug 12 2025 Azure Linux Security Servicing Account <[email protected]> - 3.0.4-9
151155
- Patch for CVE-2025-4969
152156

0 commit comments

Comments
 (0)