diff --git a/CVE-2025-10934.patch b/CVE-2025-10934.patch new file mode 100644 index 0000000000000000000000000000000000000000..d18fcaf00f280fedb84ce489db646bc91adb3b29 --- /dev/null +++ b/CVE-2025-10934.patch @@ -0,0 +1,46 @@ +From 5c3e2122d53869599d77ef0f1bdece117b24fd7c Mon Sep 17 00:00:00 2001 +From: Jacob Boerema +Date: Wed, 3 Sep 2025 18:37:26 -0400 +Subject: [PATCH] plug-ins: fix ZDI-CAN-27823 + +Origin: https://github.com/GNOME/gimp/commit/5c3e2122d53869599d77ef0f1bdece117b24fd7c + +GIMP XWD File Parsing Heap-based Buffer Overflow Remote Code Execution +Vulnerability. + +Check offset in colormap is valid before writing to it. + +Closes #14814 + +(cherry picked from commit 4eb106f2bff2d9b8e518aa455a884c6f38d70c6a) +--- + plug-ins/common/file-xwd.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c +index 8d013397be6..c4c41e5bea7 100644 +--- a/plug-ins/common/file-xwd.c ++++ b/plug-ins/common/file-xwd.c +@@ -1683,9 +1683,20 @@ load_xwd_f2_d16_b16 (GFile *file, + greenval = (green * 255) / maxgreen; + for (blue = 0; blue <= maxblue; blue++) + { ++ guint32 offset = ((red << redshift) + (green << greenshift) + ++ (blue << blueshift)) * 3; ++ ++ if (offset+2 >= maxval) ++ { ++ g_set_error (error, GIMP_PLUG_IN_ERROR, 0, ++ _("Invalid colormap offset. Possibly corrupt image.")); ++ g_free (data); ++ g_free (ColorMap); ++ g_object_unref (buffer); ++ return NULL; ++ } + blueval = (blue * 255) / maxblue; +- cm = ColorMap + ((red << redshift) + (green << greenshift) +- + (blue << blueshift)) * 3; ++ cm = ColorMap + offset; + *(cm++) = redval; + *(cm++) = greenval; + *cm = blueval; diff --git a/gimp.spec b/gimp.spec index 0ec6658e2f53faad53abf0693b660df93f4ab9be..9fdef7f25a877da3f15e7c5c8540001c6ab4c51f 100644 --- a/gimp.spec +++ b/gimp.spec @@ -35,7 +35,7 @@ Name: gimp Version: 3.0.2 -Release: 4 +Release: 5 Epoch: 2 Summary: The GNU Image Manipulation Program License: GPL-3.0-or-later @@ -49,6 +49,7 @@ Patch3: CVE-2025-10922.patch Patch4: CVE-2025-10923.patch Patch5: CVE-2025-10924.patch Patch6: CVE-2025-10925.patch +Patch7: CVE-2025-10934.patch BuildRequires: meson >= 0.61.0 BuildRequires: aalib-devel BuildRequires: babl-vala >= %{babl_version} @@ -528,6 +529,9 @@ install -D -m0644 macros.gimp %{buildroot}%{_rpmconfigdir}/macros.d/macros.gimp %dir %{_libdir}/gimp/%{api_version}/extensions/org.gimp.extension.goat-exercises/locale %changelog +* Mon Nov 03 2025 yujingbo - 2:3.0.2-5 +- Fix CVE-2025-10934 + * Fri Sep 26 2025 yaoxin <1024769339@qq.com> - 2:3.0.2-4 - Fix CVE-2025-10920, CVE-2025-10922, CVE-2025-10923, CVE-2025-10924 and CVE-2025-10925