gimp/plug-ins
Jacob Boerema 548bc3a46d plug-ins: CWE-190: Integer Overflow or Wraparound in Despeckle
As reported by Seungho Kim our despeckle filter doesn't check for
integer overflow when allocating buffers, nor do we check for failed
allocations.

A potential integer overflow vulnerability exists in the GIMP
"Despeckle" plug-in. The issue occurs due to unchecked multiplication
of image dimensions (width, height) and bytes-per-pixel (img_bpp),
which can result in allocating insufficient memory and subsequently
performing out-of-bounds writes. This could lead to heap corruption and
potential denial-of-service (DoS) or arbitrary code execution in
certain scenarios.

Vulnerability Details
•width and height are of type guint (signed 32-bit int).
•Multiplying width * height * img_bpp can result in a value exceeding
the bounds of gsize.
•g_new() does not perform overflow protection; if the size wraps around,
less memory than needed will be allocated.
•Subsequent pixel processing loops write beyond the allocated memory
region (src, dst).

Proof of Concept (PoC)
Open a specially crafted image with very large dimensions (e.g.,
70,000 x 70,000 pixels) and apply the Despeckle filter. GIMP may crash
due to heap corruption, or undefined behavior may occur.

We applied the suggested changes and in addition adjusted the despeckle
function to be able to set error messages, and check for NULL
allocations.
2025-05-07 14:50:11 -04:00
..
common plug-ins: CWE-190: Integer Overflow or Wraparound in Despeckle 2025-05-07 14:50:11 -04:00
file-bmp Fix #13900: bmp export warning dialog not showing under Linux/gdm 2025-05-03 01:14:14 +02:00
file-dds plug-ins: Read texture map size on DDS import 2025-04-03 00:54:15 +00:00
file-exr plug-ins, exr: ensure dimensions are not outside our limits... 2025-01-09 18:32:50 -05:00
file-faxg3 Issue #12277: GIMP 3.0 RC1 opens Windows Console. 2024-11-21 04:23:10 +00:00
file-fits Issue #12277: GIMP 3.0 RC1 opens Windows Console. 2024-11-21 04:23:10 +00:00
file-fli plug-ins: Fix ZDI-CAN-25100 for FLI plug-in 2025-03-10 04:07:44 +00:00
file-icns plug-ins: Fix crash when exporting indexed ICNS images 2025-03-15 17:34:03 +00:00
file-ico plug-ins: ZDI-CAN-26752 mitigation 2025-05-03 14:13:46 +00:00
file-jpeg plug-ins: Reduce JPEG dialogue height 2025-03-06 12:30:42 +00:00
file-psd plug-ins: fix #13642 crash when loading PSD... 2025-05-01 14:57:43 +00:00
file-raw Issue #12277: GIMP 3.0 RC1 opens Windows Console. 2024-11-21 04:23:10 +00:00
file-sgi plug-ins: avoid log-spamming by sgi plug-in 2024-11-24 16:54:46 +00:00
file-tiff plug-ins: Make sure CMYK profile is exported for TIFF 2025-04-25 21:02:18 +00:00
file-webp libgimp, plug-ins: rename the various "save-*" metadata arguments… 2025-01-20 17:58:30 +01:00
flame Fix spelling errors found with codespell 2025-01-04 15:11:03 +00:00
fractal-explorer plug-ins: Refresh Fractal Explorer gradient display 2025-05-05 10:33:46 +00:00
gfig libgimp, plug-ins: Prevent GFig crash with NULL brush 2025-05-05 09:36:04 +00:00
gimpressionist Issue #12277: GIMP 3.0 RC1 opens Windows Console. 2024-11-21 04:23:10 +00:00
gradient-flare plug-ins: fix gradient-flare crash in Selector editor. 2025-03-22 22:44:27 +00:00
help plug-ins: revert the multi-threading code. 2025-03-16 19:30:47 +01:00
help-browser Issue #12277: GIMP 3.0 RC1 opens Windows Console. 2024-11-21 04:23:10 +00:00
ifs-compose Issue #12277: GIMP 3.0 RC1 opens Windows Console. 2024-11-21 04:23:10 +00:00
imagemap Issue #12277: GIMP 3.0 RC1 opens Windows Console. 2024-11-21 04:23:10 +00:00
lighting Issue #12277: GIMP 3.0 RC1 opens Windows Console. 2024-11-21 04:23:10 +00:00
map-object plug-ins: Define Map Object GUI ranges 2024-12-14 14:23:46 +00:00
metadata plug-ins/metadata: fix buffer overflow in date picker 2025-03-20 21:46:34 +00:00
pagecurl app, app-tools, data, plug-ins, tools: Do not hardcode python executable 2025-04-17 14:32:06 -03:00
print plug-ins: Convert Print Preview for images with higher bit depth 2025-03-13 23:22:51 +00:00
python plug-ins, testing: add two tests for fli and ico... 2025-05-07 17:57:38 +00:00
screenshot plug-ins: Convert screenshot dropdowns to radios 2025-05-04 13:48:21 +00:00
script-fu script-fu: Restore GUI to Difference Clouds script 2025-03-28 19:18:16 +00:00
selection-to-path plug-ins: just use TRUE/FALSE instead of new macros. 2025-05-07 15:27:32 +02:00
twain Issue #12277: GIMP 3.0 RC1 opens Windows Console. 2024-11-21 04:23:10 +00:00
meson.build Issue #12717: file-bmp plugin broke cross-build with generated source 2025-01-13 22:36:41 +00:00