After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 477802 - missing input validation in the PCX plugin.
missing input validation in the PCX plugin.
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
git master
Other All
: Normal major
: 2.4
Assigned To: Nils Philippsen
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2007-09-17 15:32 UTC by Nils Philippsen
Modified: 2007-09-18 06:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to check the bytesperline header field for bogus (too low) values. (3.04 KB, patch)
2007-09-17 15:58 UTC, Nils Philippsen
needs-work Details | Review
Updated patch to check the bytesperline header field for bogus (too low) values. (3.04 KB, patch)
2007-09-17 17:24 UTC, Nils Philippsen
committed Details | Review

Description Nils Philippsen 2007-09-17 15:32:55 UTC
+++ This bug was initially created as a clone of Bug #453973 +++

Victor Stinner has discovered several flaws in file plug-ins using his fuzzyfier tool "fusil" (http://fusil.hachoir.org/).  Several modified image files cause the plug-ins to crash or consume excessive amounts of memory due to insufficient input validation.

The PCX plugin still doesn't check if the bytesperline header field is valid, i.e. if a line fits in that number of bytes per plane.
Comment 1 Nils Philippsen 2007-09-17 15:58:34 UTC
Created attachment 95742 [details] [review]
Patch to check the bytesperline header field for bogus (too low) values.
Comment 2 Sven Neumann 2007-09-17 16:04:19 UTC
This looks good except for the error message. Please try to come up with something simple as "Invalid file header". The error message you have chosen may be correct but it's just gibberish to the casual user and also for most of our translators.
Comment 3 Nils Philippsen 2007-09-17 17:24:38 UTC
Created attachment 95747 [details] [review]
Updated patch to check the bytesperline header field for bogus (too low) values.

Sven, I couldn't raise you on IRC, but Raphael and I came up with:

"Invalid number of bytes per line in PCX header (%d < %d)"

How does that sound?
Comment 4 Jakub Friedl 2007-09-17 18:05:07 UTC
Translators are not dumb :)
Comment 5 Sven Neumann 2007-09-18 06:27:28 UTC
2007-09-17  Nils Philippsen  <nphilipp@redhat.com>

        * plug-ins/common/pcx.c (load_image): verify that the bytesperline
        header field (number of bytes to allocate per plane and line)
        isn't less than the width of the image (bug #477802).