From a353e278b639b2f87bbcb9ad832a22f8b11f7aa4 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Wed, 18 Jun 2025 22:59:04 +0800 Subject: [PATCH] fix CVE-2025-6199 (cherry picked from commit ec0ffb8cc2ad764506b06905d24143e1e33120fd) --- backport-CVE-2025-6199.patch | 30 ++++++++++++++++++++++++++++++ gdk-pixbuf2.spec | 6 +++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 backport-CVE-2025-6199.patch diff --git a/backport-CVE-2025-6199.patch b/backport-CVE-2025-6199.patch new file mode 100644 index 0000000..e242f83 --- /dev/null +++ b/backport-CVE-2025-6199.patch @@ -0,0 +1,30 @@ +From c4986342b241cdc075259565f3fa7a7597d32a32 Mon Sep 17 00:00:00 2001 +From: lumi +Date: Sat, 7 Jun 2025 22:27:06 +0200 +Subject: [PATCH] lzw: Fix reporting of bytes written in decoder + +When the LZW decoder encounters an invalid code, it stops +processing the image and returns the whole buffer size. +It should return the amount of bytes written, instead. + +Fixes #257 +--- + gdk-pixbuf/lzw.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdk-pixbuf/lzw.c b/gdk-pixbuf/lzw.c +index 15293560b..4f3dd8beb 100644 +--- a/gdk-pixbuf/lzw.c ++++ b/gdk-pixbuf/lzw.c +@@ -208,7 +208,7 @@ lzw_decoder_feed (LZWDecoder *self, + /* Invalid code received - just stop here */ + if (self->code >= self->code_table_size) { + self->last_code = self->eoi_code; +- return output_length; ++ return n_written; + } + + /* Convert codeword into indexes */ +-- +GitLab + diff --git a/gdk-pixbuf2.spec b/gdk-pixbuf2.spec index 0abc755..a34c75a 100644 --- a/gdk-pixbuf2.spec +++ b/gdk-pixbuf2.spec @@ -2,13 +2,14 @@ Name: gdk-pixbuf2 Version: 2.42.10 -Release: 4 +Release: 5 Summary: gdk is a multi-platform toolkit for creating graphical user interfaces. License: LGPLv2+ URL: https://gitlab.gnome.org/GNOME/gdk-pixbuf Source0: https://download.gnome.org/sources/gdk-pixbuf/2.42/gdk-pixbuf-%{version}.tar.xz Patch6000: backport-CVE-2022-48622.patch +Patch6001: backport-CVE-2025-6199.patch BuildRequires: docbook-style-xsl BuildRequires: gettext @@ -132,6 +133,9 @@ gdk-pixbuf-query-loaders-%{__isa_bits} --update-cache %{_datadir}/doc/gdk-pixdata/ %changelog +* Wed Jun 18 2025 Funda Wang - 2.42.10-5 +- fix CVE-2025-6199 + * Mon Oct 14 2024 zhangpan - 2.42.10-4 - fix duplicate packaged files for help subpackages -- Gitee