Skip to content

Commit 55ea3fd

Browse files
authored
Patch libsoup for CVE-2025-32053 [Medium] (#13406)
1 parent 8972f1a commit 55ea3fd

2 files changed

Lines changed: 41 additions & 1 deletion

File tree

SPECS/libsoup/CVE-2025-32053.patch

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
From eaed42ca8d40cd9ab63764e3d63641180505f40a Mon Sep 17 00:00:00 2001
2+
From: Ar Jun <pkillarjun@protonmail.com>
3+
Date: Mon, 18 Nov 2024 14:59:51 -0600
4+
Subject: [PATCH] Fix heap buffer overflow in
5+
soup-content-sniffer.c:sniff_feed_or_html()
6+
7+
Upstream patch reference: https://gitlab.gnome.org/GNOME/libsoup/-/commit/eaed42ca8d40cd9ab63764e3d63641180505f40a
8+
---
9+
libsoup/content-sniffer/soup-content-sniffer.c | 4 ++--
10+
1 file changed, 2 insertions(+), 2 deletions(-)
11+
12+
diff --git a/libsoup/content-sniffer/soup-content-sniffer.c b/libsoup/content-sniffer/soup-content-sniffer.c
13+
index b62e4888..5a181ff1 100644
14+
--- a/libsoup/content-sniffer/soup-content-sniffer.c
15+
+++ b/libsoup/content-sniffer/soup-content-sniffer.c
16+
@@ -641,7 +641,7 @@ skip_insignificant_space (const char *resource, int *pos, int resource_length)
17+
(resource[*pos] == '\x0D')) {
18+
*pos = *pos + 1;
19+
20+
- if (*pos > resource_length)
21+
+ if (*pos >= resource_length)
22+
return TRUE;
23+
}
24+
25+
@@ -704,7 +704,7 @@ sniff_feed_or_html (SoupContentSniffer *sniffer, GBytes *buffer)
26+
do {
27+
pos++;
28+
29+
- if (pos > resource_length)
30+
+ if ((pos + 1) > resource_length)
31+
goto text_html;
32+
} while (resource[pos] != '>');
33+
34+
--
35+
GitLab
36+

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: 5%{?dist}
7+
Release: 6%{?dist}
88
License: GPLv2
99
Vendor: Microsoft Corporation
1010
Distribution: Azure Linux
@@ -62,6 +62,7 @@ Patch12: CVE-2025-32050.patch
6262
Patch13: CVE-2025-32051.patch
6363
Patch14: CVE-2025-46420.patch
6464
Patch15: CVE-2025-46421.patch
65+
Patch16: CVE-2025-32053.patch
6566

6667
%description
6768
libsoup is HTTP client/server library for GNOME
@@ -129,6 +130,9 @@ find %{buildroot} -type f -name "*.la" -delete -print
129130
%defattr(-,root,root)
130131

131132
%changelog
133+
* Wed May 7 2025 Bhagyashri Pathak <Bhapathak@microsoft.com> - 3.4.4-6
134+
- Patch for CVE-2025-32053
135+
132136
* Fri May 02 2025 Kshitiz Godara <kgodara@microsoft.com> - 3.4.4-5
133137
- Added patch for CVE-2025-2784 CVE-2025-32052 CVE-2025-32050 CVE-2025-32051 CVE-2025-46420 CVE-2025-46421
134138

0 commit comments

Comments
 (0)