diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2026-03-10 08:24:01 +0100 |
|---|---|---|
| committer | Gyorgy Sarvari <skandigraun@gmail.com> | 2026-03-10 10:45:11 +0100 |
| commit | d19e7ca8762225b3b440435016b045b8ba499daa (patch) | |
| tree | 257bf2bff91c83d3e63741efadfc2c5e0c569502 | |
| parent | 68a9fca0d806dfd13c68ffb4a7199d38feffee7a (diff) | |
| download | meta-openembedded-d19e7ca8762225b3b440435016b045b8ba499daa.tar.gz | |
gimp: patch CVE-2025-14422
Details: https://nvd.nist.gov/vuln/detail/CVE-2025-14422
Backport the patch referenced by the NVD advisory.
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
| -rw-r--r-- | meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14422.patch | 66 | ||||
| -rw-r--r-- | meta-gnome/recipes-gimp/gimp/gimp_2.10.30.bb | 1 |
2 files changed, 67 insertions, 0 deletions
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..3ac4e16b6f --- /dev/null +++ b/meta-gnome/recipes-gimp/gimp/gimp/CVE-2025-14422.patch | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | From 03104e43a71f89678ea40c45dfaad6e1f570f0cc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alx Sa <cmyk.student@gmail.com> | ||
| 3 | Date: Sun, 23 Nov 2025 16:43:51 +0000 | ||
| 4 | Subject: [PATCH] plug-ins: Fix ZDI-CAN-28273 | ||
| 5 | |||
| 6 | Resolves #15286 | ||
| 7 | Adds a check to the memory allocation | ||
| 8 | in pnm_load_raw () with g_size_checked_mul () | ||
| 9 | to see if the size would go out of bounds. | ||
| 10 | If so, we don't try to allocate and load the | ||
| 11 | image. | ||
| 12 | |||
| 13 | (cherry picked from commit 4ff2d773d58064e6130495de498e440f4a6d5edb) | ||
| 14 | |||
| 15 | CVE: CVE-2025-14422 | ||
| 16 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gimp/-/commit/1ac19bec2d5938af92e4687ed6721b97514e6644] | ||
| 17 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 18 | --- | ||
| 19 | plug-ins/common/file-pnm.c | 13 +++++++++++-- | ||
| 20 | 1 file changed, 11 insertions(+), 2 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c | ||
| 23 | index 2132eec..dda44c0 100644 | ||
| 24 | --- a/plug-ins/common/file-pnm.c | ||
| 25 | +++ b/plug-ins/common/file-pnm.c | ||
| 26 | @@ -554,7 +554,7 @@ load_image (GFile *file, | ||
| 27 | GError **error) | ||
| 28 | { | ||
| 29 | GInputStream *input; | ||
| 30 | - GeglBuffer *buffer; | ||
| 31 | + GeglBuffer *buffer = NULL; | ||
| 32 | gint32 volatile image_ID = -1; | ||
| 33 | gint32 layer_ID; | ||
| 34 | char buf[BUFLEN + 4]; /* buffer for random things like scanning */ | ||
| 35 | @@ -584,6 +584,9 @@ load_image (GFile *file, | ||
| 36 | g_object_unref (input); | ||
| 37 | g_free (pnminfo); | ||
| 38 | |||
| 39 | + if (buffer) | ||
| 40 | + g_object_unref (buffer); | ||
| 41 | + | ||
| 42 | if (image_ID != -1) | ||
| 43 | gimp_image_delete (image_ID); | ||
| 44 | |||
| 45 | @@ -819,6 +822,7 @@ pnm_load_raw (PNMScanner *scan, | ||
| 46 | GInputStream *input; | ||
| 47 | gint bpc; | ||
| 48 | guchar *data, *d; | ||
| 49 | + gsize data_size; | ||
| 50 | gushort *s; | ||
| 51 | gint x, y, i; | ||
| 52 | gint start, end, scanlines; | ||
| 53 | @@ -829,7 +833,12 @@ pnm_load_raw (PNMScanner *scan, | ||
| 54 | bpc = 1; | ||
| 55 | |||
| 56 | /* No overflow as long as gimp_tile_height() < 1365 = 2^(31 - 18) / 6 */ | ||
| 57 | - data = g_new (guchar, gimp_tile_height () * info->xres * info->np * bpc); | ||
| 58 | + if (! g_size_checked_mul (&data_size, gimp_tile_height (), info->xres) || | ||
| 59 | + ! g_size_checked_mul (&data_size, data_size, info->np) || | ||
| 60 | + ! g_size_checked_mul (&data_size, data_size, bpc)) | ||
| 61 | + CHECK_FOR_ERROR (FALSE, info->jmpbuf, _("Unsupported maximum value.")); | ||
| 62 | + | ||
| 63 | + data = g_new (guchar, data_size); | ||
| 64 | |||
| 65 | input = pnmscanner_input (scan); | ||
| 66 | |||
diff --git a/meta-gnome/recipes-gimp/gimp/gimp_2.10.30.bb b/meta-gnome/recipes-gimp/gimp/gimp_2.10.30.bb index df5d395d94..bfffd1c272 100644 --- a/meta-gnome/recipes-gimp/gimp/gimp_2.10.30.bb +++ b/meta-gnome/recipes-gimp/gimp/gimp_2.10.30.bb | |||
| @@ -51,6 +51,7 @@ SRC_URI = "https://download.gimp.org/pub/${BPN}/v${SHPV}/${BP}.tar.bz2 \ | |||
| 51 | file://CVE-2023-44441.patch \ | 51 | file://CVE-2023-44441.patch \ |
| 52 | file://CVE-2023-44442.patch \ | 52 | file://CVE-2023-44442.patch \ |
| 53 | file://CVE-2023-44443_CVE-2023-44444.patch \ | 53 | file://CVE-2023-44443_CVE-2023-44444.patch \ |
| 54 | file://CVE-2025-14422.patch \ | ||
| 54 | " | 55 | " |
| 55 | SRC_URI[sha256sum] = "88815daa76ed7d4277eeb353358bafa116cd2fcd2c861d95b95135c1d52b67dc" | 56 | SRC_URI[sha256sum] = "88815daa76ed7d4277eeb353358bafa116cd2fcd2c861d95b95135c1d52b67dc" |
| 56 | 57 | ||
