Skip to content

Commit 2225ab8

Browse files
CBL-Mariner-Botazurelinux-securityKanishk-Bansal
authored
[AUTO-CHERRYPICK] [AutoPR- Security] Patch gdk-pixbuf2 for CVE-2025-7345 - branch 3.0-dev (microsoft#14338)
Co-authored-by: Azure Linux Security Servicing Account <[email protected]> Co-authored-by: Kanishk Bansal <[email protected]>
1 parent 6f8cc9c commit 2225ab8

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

SPECS/gdk-pixbuf2/CVE-2025-7345.patch

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 4b544734b6b7944de8c0a2442ad3db482779303a Mon Sep 17 00:00:00 2001
2+
From: Azure Linux Security Servicing Account
3+
4+
Date: Mon, 14 Jul 2025 08:50:39 +0000
5+
Subject: [PATCH] Fix CVE CVE-2025-7345 in gdk-pixbuf2
6+
7+
Upstream Patch Reference: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/217.patch
8+
---
9+
gdk-pixbuf/io-jpeg.c | 8 ++++++--
10+
1 file changed, 6 insertions(+), 2 deletions(-)
11+
12+
diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
13+
index 3841fc0..9ee1d21 100644
14+
--- a/gdk-pixbuf/io-jpeg.c
15+
+++ b/gdk-pixbuf/io-jpeg.c
16+
@@ -356,6 +356,7 @@ jpeg_parse_exif_app2_segment (JpegExifContext *context, jpeg_saved_marker_ptr ma
17+
context->icc_profile = g_new (gchar, chunk_size);
18+
/* copy the segment data to the profile space */
19+
memcpy (context->icc_profile, marker->data + 14, chunk_size);
20+
+ ret = TRUE;
21+
goto out;
22+
}
23+
24+
@@ -377,12 +378,15 @@ jpeg_parse_exif_app2_segment (JpegExifContext *context, jpeg_saved_marker_ptr ma
25+
/* copy the segment data to the profile space */
26+
memcpy (context->icc_profile + offset, marker->data + 14, chunk_size);
27+
28+
- /* it's now this big plus the new data we've just copied */
29+
- context->icc_profile_size += chunk_size;
30+
+ context->icc_profile_size = MAX (context->icc_profile_size, offset + chunk_size);
31+
32+
/* success */
33+
ret = TRUE;
34+
out:
35+
+ if (!ret) {
36+
+ g_free (context->icc_profile);
37+
+ context->icc_profile = NULL;
38+
+ }
39+
return ret;
40+
}
41+
42+
--
43+
2.45.3
44+

SPECS/gdk-pixbuf2/gdk-pixbuf2.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
Summary: An image loading library
33
Name: gdk-pixbuf2
44
Version: 2.42.10
5-
Release: 3%{?dist}
5+
Release: 4%{?dist}
66
License: LGPLv2+
77
Vendor: Microsoft Corporation
88
Distribution: Azure Linux
99
URL: https://gitlab.gnome.org/GNOME/gdk-pixbuf
1010
Source0: https://download.gnome.org/sources/gdk-pixbuf/2.42/gdk-pixbuf-%{version}.tar.xz
1111
Patch0: CVE-2022-48622.patch
1212
Patch1: CVE-2025-6199.patch
13+
Patch2: CVE-2025-7345.patch
1314
BuildRequires: %{_bindir}/rst2man
1415
BuildRequires: gettext
1516
BuildRequires: libjpeg-devel
@@ -116,6 +117,9 @@ gdk-pixbuf-query-loaders-%{__isa_bits} --update-cache
116117
%{_datadir}/installed-tests
117118

118119
%changelog
120+
* Mon Jul 14 2025 Azure Linux Security Servicing Account <[email protected]> - 2.42.10-4
121+
- Patch for CVE-2025-7345
122+
119123
* Tue Jul 01 2025 Azure Linux Security Servicing Account <[email protected]> - 2.42.10-3
120124
- Patch for CVE-2025-6199
121125

0 commit comments

Comments
 (0)