Version in base suite: 3.0.4-3 Base version: gimp_3.0.4-3 Target version: gimp_3.0.4-3+deb13u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/g/gimp/gimp_3.0.4-3.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/g/gimp/gimp_3.0.4-3+deb13u1.dsc changelog | 9 +++ patches/CVE-2025-10920.patch | 25 ++++++++ patches/CVE-2025-10922.patch | 129 +++++++++++++++++++++++++++++++++++++++++++ patches/CVE-2025-10923.patch | 42 ++++++++++++++ patches/CVE-2025-10924.patch | 76 +++++++++++++++++++++++++ patches/series | 4 + 6 files changed, 285 insertions(+) gpgv: Signature made Sat Sep 27 17:17:39 2025 UTC gpgv: using RSA key B6E62F3D12AC38495C0DA90510C293B6C37C4E36 gpgv: Note: signatures using the SHA1 algorithm are rejected gpgv: Can't check signature: Bad public key dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp92g7wy3_/gimp_3.0.4-3+deb13u1.dsc: no acceptable signature found diff -Nru gimp-3.0.4/debian/changelog gimp-3.0.4/debian/changelog --- gimp-3.0.4/debian/changelog 2025-07-02 14:46:57.000000000 +0000 +++ gimp-3.0.4/debian/changelog 2025-09-27 15:03:28.000000000 +0000 @@ -1,3 +1,12 @@ +gimp (3.0.4-3+deb13u1) trixie-security; urgency=medium + + * CVE-2025-10924 (Closes: #1116461) + * CVE-2025-10923 (Closes: #1116460) + * CVE-2025-10922 (Closes: #1116459) + * CVE-2025-10920 (Closes: #1116458) + + -- Moritz Mühlenhoff Sat, 27 Sep 2025 17:03:28 +0200 + gimp (3.0.4-3) unstable; urgency=high * plug-ins: ZDI-CAN-26752 mitigation for 32-bit (Closes: #1107758) diff -Nru gimp-3.0.4/debian/patches/CVE-2025-10920.patch gimp-3.0.4/debian/patches/CVE-2025-10920.patch --- gimp-3.0.4/debian/patches/CVE-2025-10920.patch 1970-01-01 00:00:00.000000000 +0000 +++ gimp-3.0.4/debian/patches/CVE-2025-10920.patch 2025-09-27 15:03:28.000000000 +0000 @@ -0,0 +1,25 @@ +From 5f4329d324b0db7a857918941ef7e1d27f3d3992 Mon Sep 17 00:00:00 2001 +From: Alx Sa +Date: Wed, 3 Sep 2025 13:41:10 +0000 +Subject: [PATCH] plug-ins: Fix ZDI-CAN-27684 + +--- gimp-3.0.4.orig/plug-ins/file-icns/file-icns-load.c ++++ gimp-3.0.4/plug-ins/file-icns/file-icns-load.c +@@ -323,7 +323,7 @@ icns_decompress (guchar *dest, + + for (run -= 125; run > 0; run--) + { +- if (out > max) ++ if (out >= max) + { + g_message ("Corrupt icon? compressed run overflows output size."); + return FALSE; +@@ -341,7 +341,7 @@ icns_decompress (guchar *dest, + g_message ("Corrupt icon: uncompressed run overflows input size."); + return FALSE; + } +- if (out > max) ++ if (out >= max) + { + g_message ("Corrupt icon: uncompressed run overflows output size."); + return FALSE; diff -Nru gimp-3.0.4/debian/patches/CVE-2025-10922.patch gimp-3.0.4/debian/patches/CVE-2025-10922.patch --- gimp-3.0.4/debian/patches/CVE-2025-10922.patch 1970-01-01 00:00:00.000000000 +0000 +++ gimp-3.0.4/debian/patches/CVE-2025-10922.patch 2025-09-27 15:03:28.000000000 +0000 @@ -0,0 +1,129 @@ +From 0f309f9a8d82f43fa01383bc5a5c41d28727d9e3 Mon Sep 17 00:00:00 2001 +From: Jacob Boerema +Date: Wed, 3 Sep 2025 13:31:45 -0400 +Subject: [PATCH] plug-ins: fix dicom plug-in ZDI-CAN-27863 + +--- gimp-3.0.4.orig/plug-ins/common/file-dicom.c ++++ gimp-3.0.4/plug-ins/common/file-dicom.c +@@ -344,6 +344,7 @@ load_image (GFile *file, + gint bits_stored = 0; + gint high_bit = 0; + guint8 *pix_buf = NULL; ++ guint64 pixbuf_size = 0; + gboolean is_signed = FALSE; + guint8 in_sequence = 0; + gboolean implicit_encoding = FALSE; +@@ -399,6 +400,7 @@ load_image (GFile *file, + guint16 ctx_us; + guint8 *value; + guint32 tag; ++ size_t actual_read; + + if (fread (&group_word, 1, 2, dicom) == 0) + break; +@@ -503,15 +505,24 @@ load_image (GFile *file, + + if (element_length >= (G_MAXUINT - 6)) + { +- g_message ("'%s' seems to have an incorrect value field length.", +- gimp_file_get_utf8_name (file)); +- gimp_quit (); ++ g_set_error (error, GIMP_PLUG_IN_ERROR, 0, ++ _("'%s' has an an incorrect value for field size. Possibly corrupt image."), ++ gimp_file_get_utf8_name (file)); ++ g_free (dicominfo); ++ fclose (dicom); ++ return NULL; + } + + /* Read contents. Allocate a bit more to make room for casts to int + below. */ + value = g_new0 (guint8, element_length + 4); +- fread (value, 1, element_length, dicom); ++ actual_read = fread (value, 1, element_length, dicom); ++ if (actual_read < element_length) ++ { ++ g_warning ("Missing data: needed %u bytes, got %u. Possibly corrupt image.", ++ element_length, (guint32) actual_read); ++ element_length = actual_read; ++ } + + /* ignore everything inside of a sequence */ + if (in_sequence) +@@ -524,7 +535,7 @@ load_image (GFile *file, + if (big_endian && group_word != 0x0002) + ctx_us = GUINT16_SWAP_LE_BE (ctx_us); + +- g_debug ("group: %04x, element: %04x, length: %d", ++ g_debug ("group: %04x, element: %04x, length: %u", + group_word, element_word, element_length); + g_debug ("Value: %s", (char*)value); + /* Recognize some critical tags */ +@@ -658,6 +669,7 @@ load_image (GFile *file, + if (group_word == 0x7fe0 && element_word == 0x0010) + { + pix_buf = value; ++ pixbuf_size = element_length; + } + else + { +@@ -688,25 +700,50 @@ load_image (GFile *file, + } + } + ++ g_debug ("Bpp: %d, wxh: %u x %u, spp: %d\n", bpp, width, height, samples_per_pixel); ++ + if ((bpp != 8) && (bpp != 16)) + { +- g_message ("'%s' has a bpp of %d which GIMP cannot handle.", +- gimp_file_get_utf8_name (file), bpp); +- gimp_quit (); ++ g_set_error (error, GIMP_PLUG_IN_ERROR, 0, ++ _("'%s' has a bpp of %d which GIMP cannot handle."), ++ gimp_file_get_utf8_name (file), bpp); ++ g_free (pix_buf); ++ g_free (dicominfo); ++ fclose (dicom); ++ return NULL; + } + + if ((width > GIMP_MAX_IMAGE_SIZE) || (height > GIMP_MAX_IMAGE_SIZE)) + { +- g_message ("'%s' has a larger image size (%d x %d) than GIMP can handle.", +- gimp_file_get_utf8_name (file), width, height); +- gimp_quit (); ++ g_set_error (error, GIMP_PLUG_IN_ERROR, 0, ++ _("'%s' has a larger image size (%d x %d) than GIMP can handle."), ++ gimp_file_get_utf8_name (file), width, height); ++ g_free (pix_buf); ++ g_free (dicominfo); ++ fclose (dicom); ++ return NULL; + } + + if (samples_per_pixel > 3) + { +- g_message ("'%s' has samples per pixel of %d which GIMP cannot handle.", +- gimp_file_get_utf8_name (file), samples_per_pixel); +- gimp_quit (); ++ g_set_error (error, GIMP_PLUG_IN_ERROR, 0, ++ _("'%s' has samples per pixel of %d which GIMP cannot handle."), ++ gimp_file_get_utf8_name (file), samples_per_pixel); ++ g_free (pix_buf); ++ g_free (dicominfo); ++ fclose (dicom); ++ return NULL; ++ } ++ ++ if ((guint64) width * height * (bpp >> 3) * samples_per_pixel > pixbuf_size) ++ { ++ g_set_error (error, GIMP_PLUG_IN_ERROR, 0, ++ _("'%s' has not enough pixel data. Possibly corrupt image."), ++ gimp_file_get_utf8_name (file)); ++ g_free (pix_buf); ++ g_free (dicominfo); ++ fclose (dicom); ++ return NULL; + } + + dicominfo->width = width; diff -Nru gimp-3.0.4/debian/patches/CVE-2025-10923.patch gimp-3.0.4/debian/patches/CVE-2025-10923.patch --- gimp-3.0.4/debian/patches/CVE-2025-10923.patch 1970-01-01 00:00:00.000000000 +0000 +++ gimp-3.0.4/debian/patches/CVE-2025-10923.patch 2025-09-27 15:03:28.000000000 +0000 @@ -0,0 +1,42 @@ +From fb31ddf32298bb2f0f09b3ccc53464b8693a050e Mon Sep 17 00:00:00 2001 +From: Jacob Boerema +Date: Wed, 3 Sep 2025 15:25:55 -0400 +Subject: [PATCH] plug-ins: fix ZDI-CAN-27878 + +--- gimp-3.0.4.orig/plug-ins/common/file-wbmp.c ++++ gimp-3.0.4/plug-ins/common/file-wbmp.c +@@ -256,6 +256,7 @@ read_image (FILE *fd, + GeglBuffer *buffer; + guchar *dest, *temp; + gint i, cur_progress, max_progress; ++ size_t n_read; + + /* Make a new image in GIMP */ + if ((width < 0) || (width > GIMP_MAX_IMAGE_SIZE)) +@@ -280,14 +281,14 @@ read_image (FILE *fd, + + gimp_image_insert_layer (image, layer, NULL, 0); + +- dest = g_malloc0 (width * height); ++ dest = g_malloc0 ((gsize) width * height); + + ypos = 0; + + cur_progress = 0; + max_progress = height; + +- while (ReadOK (fd, &v, 1)) ++ while ((n_read = ReadOK (fd, &v, 1)) != 0) + { + for (i = 1; (i <= 8) && (xpos < width); i++, xpos++) + { +@@ -312,6 +313,9 @@ read_image (FILE *fd, + break; + } + ++ if (n_read == 0) ++ g_warning (_("Read failure at position %u. Possibly corrupt image."), ypos * width + xpos); ++ + buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (layer)); + + gegl_buffer_set (buffer, GEGL_RECTANGLE (0, 0, width, height), 0, NULL, dest, diff -Nru gimp-3.0.4/debian/patches/CVE-2025-10924.patch gimp-3.0.4/debian/patches/CVE-2025-10924.patch --- gimp-3.0.4/debian/patches/CVE-2025-10924.patch 1970-01-01 00:00:00.000000000 +0000 +++ gimp-3.0.4/debian/patches/CVE-2025-10924.patch 2025-09-27 15:03:28.000000000 +0000 @@ -0,0 +1,76 @@ +From 53b18653bca9404efeab953e75960b1cf7dedbed Mon Sep 17 00:00:00 2001 +From: Alx Sa +Date: Wed, 3 Sep 2025 22:10:34 +0000 +Subject: [PATCH] plug-ins: Fix ZDI-CAN-27836 + +--- gimp-3.0.4.orig/plug-ins/common/file-farbfeld.c ++++ gimp-3.0.4/plug-ins/common/file-farbfeld.c +@@ -261,7 +261,7 @@ load_image (GFile *file, + guchar magic_number[8]; + guint32 width; + guint32 height; +- guint32 row_size; ++ gsize row_size; + const Babl *format = babl_format ("R'G'B'A u16"); + FILE *fp; + +@@ -282,13 +282,24 @@ load_image (GFile *file, + { + g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno), + _("Failed to read Farbfeld header")); ++ fclose (fp); + return NULL; + } + + /* Header information is stored in Big-Endian format */ + width = GUINT32_FROM_BE (width); + height = GUINT32_FROM_BE (height); +- row_size = width * sizeof (guint16) * 4; ++ ++ if (width > GIMP_MAX_IMAGE_SIZE || ++ height > GIMP_MAX_IMAGE_SIZE || ++ ! g_size_checked_mul (&row_size, width, (sizeof (guint16) * 4))) ++ { ++ g_set_error (error, GIMP_PLUG_IN_ERROR, 0, ++ _("Image dimensions too large: width %d x height %d"), ++ width, height); ++ fclose (fp); ++ return NULL; ++ } + + image = gimp_image_new_with_precision (width, height, GIMP_RGB, + GIMP_PRECISION_U16_NON_LINEAR); +@@ -298,12 +309,19 @@ load_image (GFile *file, + gimp_image_get_default_new_layer_mode (image)); + gimp_image_insert_layer (image, layer, NULL, 0); + +- buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (layer)); ++ pixels = g_try_malloc (row_size); ++ if (pixels == NULL) ++ { ++ g_set_error (error, GIMP_PLUG_IN_ERROR, 0, ++ _("There was not enough memory to complete the " ++ "operation.")); ++ fclose (fp); ++ return NULL; ++ } + ++ buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (layer)); + for (gint i = 0; i < height; i++) + { +- pixels = g_malloc (row_size); +- + if (! fread (pixels, row_size, 1, fp)) + { + g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno), +@@ -318,9 +336,8 @@ load_image (GFile *file, + gegl_buffer_set (buffer, + GEGL_RECTANGLE (0, i, width, 1), 0, + format, pixels, GEGL_AUTO_ROWSTRIDE); +- +- g_free (pixels); + } ++ g_free (pixels); + + fclose (fp); + g_object_unref (buffer); diff -Nru gimp-3.0.4/debian/patches/series gimp-3.0.4/debian/patches/series --- gimp-3.0.4/debian/patches/series 2025-07-02 14:46:57.000000000 +0000 +++ gimp-3.0.4/debian/patches/series 2025-09-27 15:03:28.000000000 +0000 @@ -1 +1,5 @@ plug-ins-dds-fix-12790-for-32-bit.patch +CVE-2025-10924.patch +CVE-2025-10923.patch +CVE-2025-10922.patch +CVE-2025-10920.patch