From patchwork Mon Dec 29 14:52:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 77620 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 470B4E92733 for ; Mon, 29 Dec 2025 14:53:03 +0000 (UTC) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.44448.1767019979621335592 for ; Mon, 29 Dec 2025 06:52:59 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ihOygoRS; spf=pass (domain: gmail.com, ip: 209.85.128.51, mailfrom: skandigraun@gmail.com) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-477619f8ae5so55604615e9.3 for ; Mon, 29 Dec 2025 06:52:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767019978; x=1767624778; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=NLzK+xCapSs7qouF6WW6JyFO5ZbopaiUInk//MBfGQo=; b=ihOygoRS2y80YMcGWPulxYdwb9Fz8USYNAWMia9U1Cr8j4mwwoxiKLnR7BWXtsfW2P uDnxHjcNEjydQVm9NbtKhwfqdhlq8w4S7im8h035UfnkJUJeGGVGXl22BerVaa8c3xjq lprnGUf0rrOGMAUfFm86qvUX58cRNkIGo+s6e3pulNc8oSVBjxeHt0QqacXjjYW64Ul/ iSwDOL9XZnF/BK/A2GdevzR1Kzth7ynGE5TTU3m0njFWtqJaasfSRKQ02Kjde7F9jE16 ZNxEsgGGCI+S+VGfFaFXjiY1JfktLUvz7vGkIE7fQDvABMEYaGhUSNrQ3ow/xgBOoPqH OQGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767019978; x=1767624778; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NLzK+xCapSs7qouF6WW6JyFO5ZbopaiUInk//MBfGQo=; b=NmlX5sxodO6SMBeTmhi/iTaIsJxcOggLflJjCW+NAXU+djDNvb0ZG8UFhZJDdcfgd+ UMlu31rnzFGstmm3tXrGslZaVXMqoUi++qFFoFQD4fNcbRY3gfmgRgkAfd/+3vDmxWGU floJ6hXmd6w9F8E8s8iQoFp3+TVZjYdXoXTB2d25l9OrVfwafanUMI0F04rhvoLC6UiX B+T2B23kapz+QUGaq8ifp2vW8YRhRuc+KlWl4rGNvgfrvg0YuF2m5sN0Yc3/+IObjet2 +uAIQg1GGQRDahbvBJWLs7lQsE98qz74LKOpXuFXEOcbHWl8cHamiJKW+GTPGQoHEEa5 z4wg== X-Gm-Message-State: AOJu0YyW0WNA3hPfSU3LJ6A9hf9erCQJPBlvvSALEpnhVpp9T8fpKg2A MOUkKS8sUyd8ooqANtcBsJVDa+8DCXyBs5Hh5Y0wTkCJXSqN5GejNagbVlzu2A== X-Gm-Gg: AY/fxX6EoODvokRo/F7lXg9GUybMiJFhg9K5YqEiZqo0iDeO/NJZxvaIFbYEdyyKCNh ZTPCf+eVcUIXovhQlNoDGnkiHiuac86uTgim5SPcIcGAPuNOIwqyInOSONMCNYVCZ8cFasRcRbv o2HCTtgpq1857t+fG4BF9kH6g54642wd0f2IE6P4wtO90NRRNbHRgZ3zxs4PLnq2l60XgBIg2V8 Oh9D4/5nxs+zgBGEJegqgEGK8ut1Hdic0aO1nmCcE0y+Oyunvwmjxw10OzzHcEZV0v4eCSRiscb 5X6VEEg0OBHrpq3ySLHRrl14SQ2sBpDA+A1V8xJaSa3lfXZ5Sc4wH9uiwHFHf1/RMHd7LsAcr2F EZs7yehtBpY8BbuWeOY/ellSPDJIKjTgQN1PjazpEurLdyPt23I7GU+05+akhe6e3MSboSOxwU7 qBXbCq6t21 X-Google-Smtp-Source: AGHT+IGAViTeS7kd4tMW+oumfkk3HJftb5AefwCzHGViWFYK7BeZNdvvBwutLrLISuSybI1x0zOOHg== X-Received: by 2002:a05:600c:a31c:b0:47d:264e:b435 with SMTP id 5b1f17b1804b1-47d264eb68dmr239325865e9.22.1767019977868; Mon, 29 Dec 2025 06:52:57 -0800 (PST) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47be273e4d5sm601067785e9.6.2025.12.29.06.52.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Dec 2025 06:52:57 -0800 (PST) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-gnome][PATCH 1/4] gimp: patch CVE-2025-14422 Date: Mon, 29 Dec 2025 15:52:53 +0100 Message-ID: <20251229145256.489179-1-skandigraun@gmail.com> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 29 Dec 2025 14:53:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/122991 Details: https://nvd.nist.gov/vuln/detail/CVE-2025-14422 Pick the patch referenced by the NVD report. Signed-off-by: Gyorgy Sarvari --- .../gimp/gimp/CVE-2025-14422.patch | 66 +++++++++++++++++++ meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb | 12 ++-- 2 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14422.patch diff --git a/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14422.patch b/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14422.patch new file mode 100644 index 0000000000..420e013916 --- /dev/null +++ b/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14422.patch @@ -0,0 +1,66 @@ +From 0a941cab81396d65a8ab547847f8c542039e214f Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Sun, 23 Nov 2025 16:43:51 +0000 +Subject: [PATCH] plug-ins: Fix ZDI-CAN-28273 + +From: Alx Sa + +Resolves #15286 +Adds a check to the memory allocation +in pnm_load_raw () with g_size_checked_mul () +to see if the size would go out of bounds. +If so, we don't try to allocate and load the +image. + +CVE: CVE-2025-14422 +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gimp/-/commit/4ff2d773d58064e6130495de498e440f4a6d5edb] +Signed-off-by: Gyorgy Sarvari +--- + plug-ins/common/file-pnm.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c +index 32a33a4..9d349e9 100644 +--- a/plug-ins/common/file-pnm.c ++++ b/plug-ins/common/file-pnm.c +@@ -674,7 +674,7 @@ load_image (GFile *file, + GError **error) + { + GInputStream *input; +- GeglBuffer *buffer; ++ GeglBuffer *buffer = NULL; + GimpImage * volatile image = NULL; + GimpLayer *layer; + char buf[BUFLEN + 4]; /* buffer for random things like scanning */ +@@ -708,6 +708,9 @@ load_image (GFile *file, + g_object_unref (input); + g_free (pnminfo); + ++ if (buffer) ++ g_object_unref (buffer); ++ + if (image) + gimp_image_delete (image); + +@@ -1060,6 +1063,7 @@ pnm_load_raw (PNMScanner *scan, + const Babl *format = NULL; + gint bpc; + guchar *data, *d; ++ gsize data_size; + gushort *s; + gint x, y, i; + gint start, end, scanlines; +@@ -1070,7 +1074,12 @@ pnm_load_raw (PNMScanner *scan, + bpc = 1; + + /* No overflow as long as gimp_tile_height() < 1365 = 2^(31 - 18) / 6 */ +- data = g_new (guchar, gimp_tile_height () * info->xres * info->np * bpc); ++ if (! g_size_checked_mul (&data_size, gimp_tile_height (), info->xres) || ++ ! g_size_checked_mul (&data_size, data_size, info->np) || ++ ! g_size_checked_mul (&data_size, data_size, bpc)) ++ CHECK_FOR_ERROR (FALSE, info->jmpbuf, _("Unsupported maximum value.")); ++ ++ data = g_new (guchar, data_size); + + input = pnmscanner_input (scan); + diff --git a/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb b/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb index 9f38cdcd03..f529930dff 100644 --- a/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb +++ b/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb @@ -56,11 +56,13 @@ GIDOCGEN_MESON_OPTION = "gi-docgen" GIDOCGEN_MESON_ENABLE_FLAG = "enabled" GIDOCGEN_MESON_DISABLE_FLAG = "disabled" -SRC_URI = "https://download.gimp.org/gimp/v3.0/${BP}.tar.xz" -SRC_URI += "file://0001-gimp-cross-compile-fix-for-bz2.patch" -SRC_URI += "file://0002-meson.build-reproducibility-fix.patch" -SRC_URI += "file://0001-meson.build-dont-check-for-lgi.patch" -SRC_URI += "file://0001-meson.build-require-iso-codes-native.patch" +SRC_URI = "https://download.gimp.org/gimp/v3.0/${BP}.tar.xz \ + file://0001-gimp-cross-compile-fix-for-bz2.patch \ + file://0002-meson.build-reproducibility-fix.patch \ + file://0001-meson.build-dont-check-for-lgi.patch \ + file://0001-meson.build-require-iso-codes-native.patch \ + file://CVE-2025-14422.patch \ + " SRC_URI[sha256sum] = "246c225383c72ef9f0dc7703b7d707084bbf177bd2900e94ce466a62862e296b" PACKAGECONFIG[aa] = "-Daa=enabled,-Daa=disabled,aalib" From patchwork Mon Dec 29 14:52:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 77619 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B21BE9273B for ; Mon, 29 Dec 2025 14:53:03 +0000 (UTC) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.44450.1767019980367395287 for ; Mon, 29 Dec 2025 06:53:00 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=buObcrat; spf=pass (domain: gmail.com, ip: 209.85.128.50, mailfrom: skandigraun@gmail.com) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-47755de027eso54193055e9.0 for ; Mon, 29 Dec 2025 06:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767019979; x=1767624779; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=2fv6qcOEqOl8hcCa9E4GTm+MUsTFA5X+SYHrrN29tig=; b=buObcratWvkWB0SN4fHuYiz9vM93gVxEh4GA1v3Q+4Jx+94c/durk1h5dAegfCc1s1 ESuvXwKqQCQZHPJVPDKbReFS4c/dTzzT27etCODFFTK/gWS9LXD5ziGkyYZFrzTa4Ll1 p/HYKXiZ/q0EEi0S6SzSU/anbwqeHTD6bJkmdQJ0DLkjfHy8v8g0L1WTFFeMNkr7gt/v ZTmxgindNDo5kC8HXu9KP4i2T8xgIaoEBpA3qPbx/tnC4vz8K60P97G5Lwc7/+dipRhP kh76872DZaY/9QB7wJO/3MhuL58w4RqcQXsm/oHA9MQ9ZFKzCoURbIftyrjj7+Pz4JQg WRyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767019979; x=1767624779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=2fv6qcOEqOl8hcCa9E4GTm+MUsTFA5X+SYHrrN29tig=; b=uFRSa+0xd1TFG4Ts9mu51J3juaW6hQCoOo8QiCuJ9k0GKjPG3J/OwLMMDu3b0+rJom 2j+lwWda6XUQm6fzv0kHtF/nKdNVNeTur1F/2FtJtskYwMMdTzwTag2jjKzX0x+/J7n7 qhMnzMMAwIV/pUzvSgsPG8XmJ9M+QAFl2pCOmOuQJFjYl4XfkNxMPPIqfLoTnbepKxQj WW0c+W58x0XrJqKGbP2mX4YxOegeyfiFf/nt0w2bvgyV/R/CGtNBaLOj/syqzxC2sZ+v b+CevZiUAlcJC1b2MHM26dW909loZNa7Orp0qED7T0Uiqrmabl9PrhWFU0foBl0UU9Il zGMQ== X-Gm-Message-State: AOJu0YwQ4k7nkYoNnoSGo0xa7kPOU2hxVrMyPE+F92Ooshp/BpMsneY7 JgX8C0sLrMnUY5aK2pQGL9Z191/8KCIAWp2JsURZpzft1BwbUO7RQO2kyWQbWQ== X-Gm-Gg: AY/fxX6QLuAxr/qikAxR8K7IRduvai4Ab0q5ZdTyG6tw6immW/NZsA3xdvZRO+FYyU6 cUrle6m4fN0ogC8F3WI6/5t0MmPs07VtfmN2iCDyi3QHpnpZ4Wf3IXQOIpwG45b0nvvbGceAqCG jQruAsxhjGawqtw2BrJLTFsCzo10dEZNgXzlUCXETqF51WC+cgHZcTAcffDQvxkvSFt2XkrbYCs Izw9fBL4LUVaiVs+bod5j+X+NKISm5uURoTXC/hYtXsLpxSv2Bx8/dAZ568NJXsMvS4/eYEKUEf VE9NkAp59Q0bDdEflIXYqFNL0n7IP2tK19bsJpPzyeHYNyyyH0HCD1n6FQl6/V1Beuc3v4+ovFc 4+PKacwYHaWamCKJWvSsnpbmgY0AD0+Tu0DUxMs7HkrJY8pAMExd4RTCd3vo+cwDqDZGzGCm0io Oa+DLChihi X-Google-Smtp-Source: AGHT+IGUNDlPOSE476CsDUQbb8Qhs3W1bpVK7ysZIrO5dEUsV/fztlcO9q/VfFMwiEbDTI4q41cexg== X-Received: by 2002:a05:600c:8287:b0:477:76bf:e1fb with SMTP id 5b1f17b1804b1-47d1955578bmr410365475e9.16.1767019978555; Mon, 29 Dec 2025 06:52:58 -0800 (PST) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47be273e4d5sm601067785e9.6.2025.12.29.06.52.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Dec 2025 06:52:58 -0800 (PST) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-gnome][PATCH 2/4] gimp: patch CVE-2025-14423 Date: Mon, 29 Dec 2025 15:52:54 +0100 Message-ID: <20251229145256.489179-2-skandigraun@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251229145256.489179-1-skandigraun@gmail.com> References: <20251229145256.489179-1-skandigraun@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 29 Dec 2025 14:53:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/122992 Details: https://nvd.nist.gov/vuln/detail/CVE-2025-14423 Pick the patch references by the NVD report. Signed-off-by: Gyorgy Sarvari --- .../gimp/gimp/CVE-2025-14423.patch | 106 ++++++++++++++++++ meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb | 1 + 2 files changed, 107 insertions(+) create mode 100644 meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14423.patch diff --git a/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14423.patch b/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14423.patch new file mode 100644 index 0000000000..50a0adfe89 --- /dev/null +++ b/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14423.patch @@ -0,0 +1,106 @@ +From a83e8c4ad8ffbce40aa9f9a0f49880e802ef7da1 Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Sun, 23 Nov 2025 04:22:49 +0000 +Subject: [PATCH] plug-ins: Fix ZDI-CAN-28311 + +From: Alx Sa + +Resolves #15292 +The IFF specification states that EHB format images +have exactly 32 colors in their palette. However, it +is possible for images in the wild to place an incorrect +palette size. This patch checks for this, and either limits +the palette size or breaks accordingly. + +CVE: CVE-2025-14423 +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gimp/-/commit/481cdbbb97746be1145ec3a633c567a68633c521] +Signed-off-by: Gyorgy Sarvari +--- + plug-ins/common/file-iff.c | 32 ++++++++++++++++++++++---------- + 1 file changed, 22 insertions(+), 10 deletions(-) + +diff --git a/plug-ins/common/file-iff.c b/plug-ins/common/file-iff.c +index d144a96..f087947 100644 +--- a/plug-ins/common/file-iff.c ++++ b/plug-ins/common/file-iff.c +@@ -337,7 +337,7 @@ load_image (GFile *file, + width = bitMapHeader->w; + height = bitMapHeader->h; + nPlanes = bitMapHeader->nPlanes; +- row_length = (width + 15) / 16; ++ row_length = ((width + 15) / 16) * 2; + pixel_size = nPlanes / 8; + aspect_x = bitMapHeader->xAspect; + aspect_y = bitMapHeader->yAspect; +@@ -375,6 +375,18 @@ load_image (GFile *file, + { + /* EHB mode adds 32 more colors. Each are half the RGB values + * of the first 32 colors */ ++ if (palette_size < 32) ++ { ++ g_set_error (error, G_FILE_ERROR, ++ g_file_error_from_errno (errno), ++ _("Invalid ILBM colormap size")); ++ return NULL; ++ } ++ else if (palette_size > 32) ++ { ++ palette_size = 32; ++ } ++ + for (gint j = 0; j < palette_size * 2; j++) + { + gint offset_index = j + 32; +@@ -386,7 +398,7 @@ load_image (GFile *file, + gimp_cmap[offset_index * 3 + 2] = + colorMap->colorRegister[j].blue / 2; + } +- /* EHB mode always has 64 colors */ ++ /* EHB mode always has 64 colors in total */ + palette_size = 64; + } + } +@@ -447,7 +459,7 @@ load_image (GFile *file, + { + guchar *pixel_row; + +- pixel_row = g_malloc (width * pixel_size * sizeof (guchar)); ++ pixel_row = g_malloc0 (width * pixel_size); + + /* PBM uses one byte per pixel index */ + if (ILBM_imageIsPBM (true_image)) +@@ -459,7 +471,7 @@ load_image (GFile *file, + else + deleave_rgb_row (bitplanes, pixel_row, width, nPlanes, pixel_size); + +- bitplanes += (row_length * 2 * nPlanes); ++ bitplanes += (row_length * nPlanes); + + gegl_buffer_set (buffer, GEGL_RECTANGLE (0, y_height, width, 1), 0, + NULL, pixel_row, GEGL_AUTO_ROWSTRIDE); +@@ -528,7 +540,7 @@ deleave_ham_row (const guchar *gimp_cmap, + /* Deleave rows */ + for (gint i = 0; i < row_length; i++) + { +- for (gint j = 0; j < 8; j++) ++ for (gint j = 0; j < nPlanes; j++) + { + guint8 bitmask = (1 << (8 - j)) - (1 << (7 - j)); + guint8 control = 0; +@@ -590,11 +602,11 @@ deleave_ham_row (const guchar *gimp_cmap, + } + + static void +-deleave_rgb_row (IFF_UByte *bitplanes, +- guchar *pixel_row, +- gint width, +- gint nPlanes, +- gint pixel_size) ++deleave_rgb_row (IFF_UByte *bitplanes, ++ guchar *pixel_row, ++ gint width, ++ gint nPlanes, ++ gint pixel_size) + { + gint row_length = ((width + 15) / 16) * 2; + gint current_pixel = 0; diff --git a/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb b/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb index f529930dff..24281e5dfd 100644 --- a/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb +++ b/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb @@ -62,6 +62,7 @@ SRC_URI = "https://download.gimp.org/gimp/v3.0/${BP}.tar.xz \ file://0001-meson.build-dont-check-for-lgi.patch \ file://0001-meson.build-require-iso-codes-native.patch \ file://CVE-2025-14422.patch \ + file://CVE-2025-14423.patch \ " SRC_URI[sha256sum] = "246c225383c72ef9f0dc7703b7d707084bbf177bd2900e94ce466a62862e296b" From patchwork Mon Dec 29 14:52:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 77621 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B1D7E9273A for ; Mon, 29 Dec 2025 14:53:03 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.44464.1767019980989491178 for ; Mon, 29 Dec 2025 06:53:01 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kDF2qNWm; spf=pass (domain: gmail.com, ip: 209.85.128.47, mailfrom: skandigraun@gmail.com) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-47774d3536dso72919365e9.0 for ; Mon, 29 Dec 2025 06:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767019979; x=1767624779; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yDuqar3YEfq3JCW1eRHnPMFowfgqs1E5JH1NlmjbqvQ=; b=kDF2qNWmrDc5bOh9Kbp72L6VosX5DwADCBHfD+vl201VFH1eK4VNWhMzMhHHx3e//s +5x6D1q+8Z8EsHfo/Y4WolR5Ajprycccuykr7fXbv7UYDfuxoUC04c0G8unpVUMh/LHo DSjCjRjBN5aF9l6YM2MQ7OZ6kT74K8qwAvm51OCBYJGj5JlRhEWozxXg5bjfJgr04QbK umOWDgl3DkV2mrsVnJYHUN/7Tmo8Gw9GHe8K7wOecCNkVpJzU+e1tpsVRe8WL9AUFb7r Xwr5IiPPB2bstZ1j79BRlw50eeCi15z3sdAoM+m5yQI/LGWi3XAersBbH6261S9f83PJ RtZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767019979; x=1767624779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=yDuqar3YEfq3JCW1eRHnPMFowfgqs1E5JH1NlmjbqvQ=; b=svfVmK1Ymlvs1ioa/Q+uaFTwORdP3eWUx6skNrWo7C+R2pq89EdfEBhPWZOQIvFNr6 Crrsk3XIFjjVqnqYV6dfTVuxsMd5jzuta+qDXpXGUq7fqv2uHgkouBh2VaMkVOSMS/AH FRZNmr7nRBDK/ax92YFcvnBjsHh4feexd8IUhST15UN5WJ1tEmEVxV9Gkh2+k7m26I7P 2QUqzKsMmjveDvDDFtxlHWriPHClDwbbiuxURiUlB/WfXWTiwWSX9PLViK0H2nplXZe8 5MdKEMiERKfLC/ooaxtBhPUqovWO8gYwrA58VW0HG4cPZVGY98pYGQ70BTuud6NXpNeF 4hDQ== X-Gm-Message-State: AOJu0YxG9tClUk0s/JUGiRhebXmKW42+PcEMyLeT3rq5+658kE4t0C1X sLkcLZwW6M6MIKlHH+TB2vFBKl0tNpIq/WYEFnyOMgnkXoV4EnL0EwCrDf/SsQ== X-Gm-Gg: AY/fxX6OYA2rCFUol/NGTEkE7vpG3Wcvrckbl/2uMlQoUgNDuAvp6uuC+lBKXxO06tD qHJ3hQwPoWhAcOyrHhwZYcJcD+UVC0w60WwS0fTw890Uzm6Lhk8pg8+5Io44kidHc7SpZWBmZV7 o4C7wbvUm/fHVswCwL39mEPdFq9hgDqt98ySO4XfATgchRuNGoQKT3/8dybTlR7FgCiTGoHpdXG ABuMSW/pR1VMej6mTwAoBzXBtFPjnqt/FWMzfSSG6nUBY5G+/G56hnV4HsPo/d14T6nqXzQZ3bh xEmR6a2uEOy2WpMhW3jIhuGZ92NMC3F3MQhcFAwL2wMkvzBx3D9poSMOFxcjWXE/fdoqVp+t8vK S/F1H8Cetzqv/a8ipjtPEDMn3N5lZcEYtfJiFEpSbNVQOsgGyyhhUeSQII/silMZQXZt6YA8LGf eZUebXLQVC X-Google-Smtp-Source: AGHT+IGXOxLw2Iy57FUrpdvMkMvQpgMs0rDn7+BQtYUdSphsD24K3iCRr9bqMfPtjhrmSB2VwBWtqQ== X-Received: by 2002:a05:600c:6749:b0:471:665:e688 with SMTP id 5b1f17b1804b1-47d18be89d5mr442216715e9.17.1767019979223; Mon, 29 Dec 2025 06:52:59 -0800 (PST) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47be273e4d5sm601067785e9.6.2025.12.29.06.52.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Dec 2025 06:52:58 -0800 (PST) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-gnome][PATCH 3/4] gimp: patch CVE-2025-14424 Date: Mon, 29 Dec 2025 15:52:55 +0100 Message-ID: <20251229145256.489179-3-skandigraun@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251229145256.489179-1-skandigraun@gmail.com> References: <20251229145256.489179-1-skandigraun@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 29 Dec 2025 14:53:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/122993 Details: https://nvd.nist.gov/vuln/detail/CVE-2025-14424 Pick the patch referenced by the NVD report. Signed-off-by: Gyorgy Sarvari --- .../gimp/gimp/CVE-2025-14424.patch | 34 +++++++++++++++++++ meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14424.patch diff --git a/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14424.patch b/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14424.patch new file mode 100644 index 0000000000..e7821d3109 --- /dev/null +++ b/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14424.patch @@ -0,0 +1,34 @@ +From d30875b606085316b1cb7ac1da0d26e5bac0cf2c Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Thu, 13 Nov 2025 18:26:51 -0500 +Subject: [PATCH] app: fix #15288 crash when loading malformed xcf + +From: Jacob Boerema + +ZDI-CAN-28376 vulnerability + +Add extra tests to not crash on a NULL g_class. + +CVE: CVE-2025-14424 +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gimp/-/commit/5cc55d078b7fba995cef77d195fac325ee288ddd] +Signed-off-by: Gyorgy Sarvari +--- + app/core/gimpitemlist.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/app/core/gimpitemlist.c b/app/core/gimpitemlist.c +index 6473938..a431519 100644 +--- a/app/core/gimpitemlist.c ++++ b/app/core/gimpitemlist.c +@@ -345,7 +345,10 @@ gimp_item_list_named_new (GimpImage *image, + g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); + + for (iter = items; iter; iter = iter->next) +- g_return_val_if_fail (g_type_is_a (G_OBJECT_TYPE (iter->data), item_type), NULL); ++ { ++ g_return_val_if_fail (iter->data && ((GTypeInstance*) (iter->data))->g_class, NULL); ++ g_return_val_if_fail (g_type_is_a (G_OBJECT_TYPE (iter->data), item_type), NULL); ++ } + + if (! items) + { diff --git a/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb b/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb index 24281e5dfd..bc55aed06f 100644 --- a/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb +++ b/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb @@ -63,6 +63,7 @@ SRC_URI = "https://download.gimp.org/gimp/v3.0/${BP}.tar.xz \ file://0001-meson.build-require-iso-codes-native.patch \ file://CVE-2025-14422.patch \ file://CVE-2025-14423.patch \ + file://CVE-2025-14424.patch \ " SRC_URI[sha256sum] = "246c225383c72ef9f0dc7703b7d707084bbf177bd2900e94ce466a62862e296b" From patchwork Mon Dec 29 14:52:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 77622 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48485D3B7E5 for ; Mon, 29 Dec 2025 14:53:03 +0000 (UTC) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.44451.1767019981641126189 for ; Mon, 29 Dec 2025 06:53:01 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PvdpruYf; spf=pass (domain: gmail.com, ip: 209.85.128.41, mailfrom: skandigraun@gmail.com) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-477a2ab455fso87665435e9.3 for ; Mon, 29 Dec 2025 06:53:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767019980; x=1767624780; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=oiu6wI+AzLjkPFSV3R3T7/ZFu0n5D7c8TkbgplQePR0=; b=PvdpruYf0HA4anD5KlioHAp6fWMEC+Za/vaHEDXWSPz/V/0OBjxiNx9oHI1BJXFk5B WSRRPg/CUK21WmlHz/J+tgz3+KX7EeOjW4CyfHtt+BM4n25JLE8NHrG6VQYyDDjv0Ye4 xSef4Tjn5eZgY9ahhGyFquT5omQOatGUcZD7ZXIyfmS9IhdQQu2+dxKNp6nU+Ow4WBao ianYphm90CuFUfR+znMQK4yILAaiZIKfBoUx5KHYaKuOrIomanroCur422cAqL/trVb3 iu25pF/uD2+eqQyFPfRTxCtWnqy6JxEJWP+PEejexU4aja8gNMPgAO1VNQ3YjZsS6jS1 adCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767019980; x=1767624780; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=oiu6wI+AzLjkPFSV3R3T7/ZFu0n5D7c8TkbgplQePR0=; b=kiTqVtUk5hF+g09dxSTUW3vIzeilJxYlHMZBzHTZZsyxDp/Wu5fn3nPIAgDjcZRTJu bkIMZvwx6sNJYSphhI/lE4cnREP4o6Xk4mj9n3dhq3lH37AGV2MKVDeYfx1+SFdXTiQs 8jt5NwjipYOQRqSYgsv+4RDnEauyQUkabRN1X6s0gnq+Ih99lw5n1TDHIjYXHP05YBww iQw9J4fXqEqxbKS7zvOS+2TxnolmnCOQ06bZHGgvP1Mfacm71opTq+rYFwpQAET3zpc8 yVtNlLOEe2uJ0JdxqALlm39vO2i/YdEzeaeaUALjev7FTqgIvzrusZaIHS4ytjBZlGES WFZg== X-Gm-Message-State: AOJu0Ywffkhd2n+NFRP/7mK7CVRMUEGToFIJS0U6orP1nb0dhO7+dBym gsMjJJxqYFQ5w5nk0dCjGs9BfqSSS6BJ4DD2dI4OAjETn4cSiYPLVIbt8sKNEw== X-Gm-Gg: AY/fxX6Uj7M8ZTpqiMTSoIT88C012kNbztrH27tPA3EBLv82DzBAqlLf074BEvgv+Pa 9PkUGCCTDds/vbOrvq+cez0k/YhGj5ioL3zQb/DHEnQ6Ctx8JB5bQhu3N3OrLdOa9pzF/enGFVZ GGwR0+9PzT4hQW/jzHKT8n8ayKDV4lZXS+3+GGS9ClfUbITFVGacKgXbU0tXIo3/eyqRfEPYwY8 TSr9anB1DUlSDDxzFzNSHdiWVH0R/yCh1Q48eLz1Dxw2vsYAc1Ek1tXiDzoljzNMAhHZ9ah7EZ3 0xTFQk5pfAkmLAx0mVsCiSrmPtG4lz3eFo18DpgD8W/ZbcKXnrybpTyup5Wx3waPBBCwvkdJZ/o rNI+4OAW+pcaYbgTcibev2gC8V+AM/m31uINwAFJynind4KdsIjaJ+mwrOOPw3Mso+5YRpcQFyK AaS5Zr+jZI X-Google-Smtp-Source: AGHT+IHRrr7/RqcOMx0tSzTeVB8dqkvYA9hYsf1iTW+6o1tHTOj2grXIBfDC4DeVQ9iylTc4DNrNoQ== X-Received: by 2002:a05:600c:8b56:b0:479:3a86:dc1a with SMTP id 5b1f17b1804b1-47d5b21d77emr21667215e9.36.1767019979909; Mon, 29 Dec 2025 06:52:59 -0800 (PST) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47be273e4d5sm601067785e9.6.2025.12.29.06.52.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Dec 2025 06:52:59 -0800 (PST) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-gnome][PATCH 4/4] gimp: patch CVE-2025-14425 Date: Mon, 29 Dec 2025 15:52:56 +0100 Message-ID: <20251229145256.489179-4-skandigraun@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251229145256.489179-1-skandigraun@gmail.com> References: <20251229145256.489179-1-skandigraun@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 29 Dec 2025 14:53:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/122994 Details: https://nvd.nist.gov/vuln/detail/CVE-2025-14425 Backport the patch referenced by the nvd report. Signed-off-by: Gyorgy Sarvari --- .../gimp/gimp/CVE-2025-14425.patch | 79 +++++++++++++++++++ meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb | 1 + 2 files changed, 80 insertions(+) create mode 100644 meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14425.patch diff --git a/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14425.patch b/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14425.patch new file mode 100644 index 0000000000..44e9587570 --- /dev/null +++ b/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14425.patch @@ -0,0 +1,79 @@ +From 042e27792026460badbe49664c02fe181e95cb2b Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Wed, 12 Nov 2025 13:25:44 +0000 +Subject: [PATCH] plug-ins: Mitigate ZDI-CAN-28248 for JP2 images + +From: Alx Sa + +Resolves #15285 +Per the report, it's possible to exceed the size of the pixel buffer +with a high precision_scaled value, as we size it to the width * bpp. +This patch includes precision_scaled in the allocation calculation. +It also adds a g_size_checked_mul () check to ensure there's no +overflow, and moves the pixel and buffer memory freeing to occur +in the out section so that it always runs even on failure. + +CVE: CVE-2025-14425 +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gimp/-/commit/cd1c88a0364ad1444c06536731972a99bd8643fd] +Signed-off-by: Gyorgy Sarvari +--- + plug-ins/common/file-jp2-load.c | 23 ++++++++++++++++------- + 1 file changed, 16 insertions(+), 7 deletions(-) + +diff --git a/plug-ins/common/file-jp2-load.c b/plug-ins/common/file-jp2-load.c +index 064b616..604313a 100644 +--- a/plug-ins/common/file-jp2-load.c ++++ b/plug-ins/common/file-jp2-load.c +@@ -1045,14 +1045,15 @@ load_image (GimpProcedure *procedure, + GimpColorProfile *profile = NULL; + GimpImage *gimp_image = NULL; + GimpLayer *layer; ++ GeglBuffer *buffer = NULL; ++ guchar *pixels = NULL; ++ gsize pixels_size; + GimpImageType image_type; + GimpImageBaseType base_type; + gint width; + gint height; + gint num_components; +- GeglBuffer *buffer; + gint i, j, k, it; +- guchar *pixels; + const Babl *file_format; + gint bpp; + GimpPrecision image_precision; +@@ -1318,7 +1319,15 @@ load_image (GimpProcedure *procedure, + bpp = babl_format_get_bytes_per_pixel (file_format); + + buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (layer)); +- pixels = g_new0 (guchar, width * bpp); ++ ++ if (! g_size_checked_mul (&pixels_size, width, (bpp * (precision_scaled / 8)))) ++ { ++ g_set_error (error, GIMP_PLUG_IN_ERROR, 0, ++ _("Defined row size is too large in JP2 image '%s'."), ++ gimp_file_get_utf8_name (file)); ++ goto out; ++ } ++ pixels = g_new0 (guchar, pixels_size); + + for (i = 0; i < height; i++) + { +@@ -1344,13 +1353,13 @@ load_image (GimpProcedure *procedure, + gegl_buffer_set (buffer, GEGL_RECTANGLE (0, i, width, 1), 0, + file_format, pixels, GEGL_AUTO_ROWSTRIDE); + } +- +- g_free (pixels); +- +- g_object_unref (buffer); + gimp_progress_update (1.0); + + out: ++ if (pixels) ++ g_free (pixels); ++ if (buffer) ++ g_object_unref (buffer); + if (profile) + g_object_unref (profile); + if (image) diff --git a/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb b/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb index bc55aed06f..fa192555bc 100644 --- a/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb +++ b/meta-gnome/recipes-gimp/gimp/gimp_3.0.6.bb @@ -64,6 +64,7 @@ SRC_URI = "https://download.gimp.org/gimp/v3.0/${BP}.tar.xz \ file://CVE-2025-14422.patch \ file://CVE-2025-14423.patch \ file://CVE-2025-14424.patch \ + file://CVE-2025-14425.patch \ " SRC_URI[sha256sum] = "246c225383c72ef9f0dc7703b7d707084bbf177bd2900e94ce466a62862e296b"