Skip to content

Commit 6f98ff9

Browse files
[AutoPR- Security] Patch libsoup for CVE-2025-11021 [HIGH] (microsoft#14947)
Co-authored-by: jslobodzian <[email protected]>
1 parent b840be6 commit 6f98ff9

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 e4ba9e66488af3251fe6b71a3119ee2bd5ca4750 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 7c41b1d..5af154d 100644
20+
--- a/libsoup/cookies/soup-cookie.c
21+
+++ b/libsoup/cookies/soup-cookie.c
22+
@@ -726,12 +726,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 fd785f5..e5aa805 100644
42+
--- a/libsoup/soup-date-utils.c
43+
+++ b/libsoup/soup-date-utils.c
44+
@@ -95,6 +95,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
@@ -4,7 +4,7 @@
44
Summary: libsoup HTTP client/server library
55
Name: libsoup
66
Version: 3.4.4
7-
Release: 9%{?dist}
7+
Release: 10%{?dist}
88
License: GPLv2
99
Vendor: Microsoft Corporation
1010
Distribution: Azure Linux
@@ -67,6 +67,7 @@ Patch17: CVE-2025-4476.patch
6767
Patch18: CVE-2025-32907.patch
6868
Patch19: CVE-2025-4948.patch
6969
Patch20: CVE-2025-4969.patch
70+
Patch21: CVE-2025-11021.patch
7071

7172
%description
7273
libsoup is HTTP client/server library for GNOME
@@ -134,6 +135,9 @@ find %{buildroot} -type f -name "*.la" -delete -print
134135
%defattr(-,root,root)
135136

136137
%changelog
138+
* Wed Oct 29 2025 Azure Linux Security Servicing Account <[email protected]> - 3.4.4-10
139+
- Patch for CVE-2025-11021
140+
137141
* Tue Aug 12 2025 Azure Linux Security Servicing Account <[email protected]> - 3.4.4-9
138142
- Patch for CVE-2025-4969
139143

0 commit comments

Comments
 (0)