Bug 2496166 (CVE-2026-58381) - CVE-2026-58381 gimp: gimp: Double-free in read_layer_block()
Summary: CVE-2026-58381 gimp: gimp: Double-free in read_layer_block()
Keywords:
Status: NEW
Alias: CVE-2026-58381
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-07-01 20:22 UTC by OSIDB Bzimport
Modified: 2026-07-02 19:42 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-07-01 20:22:45 UTC
A double-free vulnerability exists in GIMP's Paint Shop Pro (PSP) file format parser. In read_layer_block() in file-psp.c, the variable name is allocated, used, and freed each loop iteration. On the error path in the 2nd iteration, fread fails before g_malloc for name, so the stale pointer from iteration 1 is freed again via g_free(name).

- Function: read_layer_block()
- File: plug-ins/common/file-psp.c:1908-2321
- Fix: https://gitlab.gnome.org/GNOME/gimp/-/commit/b22e147b
- Upstream issue: https://gitlab.gnome.org/GNOME/gimp/-/issues/16207
- Acknowledgment: bb1abu


Note You need to log in before you can comment on or make changes to this bug.