Bug 238420 (CVE-2007-2356)

Summary: CVE-2007-2356 Stack overflow in gimp's sunras plugin
Product: [Other] Security Response Reporter: Lubomir Kundrak <lkundrak>
Component: vulnerabilityAssignee: Nils Philippsen <nphilipp>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://milw0rm.com/exploits/3801
Whiteboard:
Fixed In Version: RHSA-2007-0343 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-21 13:02:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 238684    
Attachments:
Description Flags
Malformed Sun RAS file, that overflows stack in gimp's sunras plugin none

Description Lubomir Kundrak 2007-04-30 12:32:40 UTC
Description of problem:

There is a possible stack-based buffer overrun in function
plug-ins/common/sunras.c:set_color_table() that can be exploited by an
attacker to trigger execution of arbitrary code via crafted Sun RAS file.

Version-Release number of selected component (if applicable):

        Affects: RHEL2.1
        Affects: RHEL3
        Affects: RHEL4
        Affects: RHEL5
        Affects: FC5
        Affects: FC6

Steps to Reproduce:

Either use the program referred to in URL to generate a POC, or use one
that is attached to this bug.

Additional info:

Though I have reproduced a crash on all supported systems, as enumerated
above, for some unknown reason gdb was detaching from the plugin run with
GIMP_PLUGIN_DEBUG=sunras, so I was unable to do a depth-in investigation.
I deduce, that it is a stack overflow because core dumps showed evidence
of corrupt stack, with ssp glibc detects a stack smashing, and Secunia
advisory also states the same:

http://secunia.com/advisories/25012/?answer=57

Comment 1 Lubomir Kundrak 2007-04-30 12:32:40 UTC
Created attachment 153788 [details]
Malformed Sun RAS file, that overflows stack in gimp's sunras plugin

Comment 2 Nils Philippsen 2007-04-30 16:02:43 UTC
Upstream already has a fix by Sven Neumann, I've extracted that from the SVN
repo and I'm just building the package (with two minor, trivial packaging fixes)
locally to see that it works out.

Comment 6 Lubomir Kundrak 2007-05-02 10:03:58 UTC
*** Bug 238684 has been marked as a duplicate of this bug. ***

Comment 19 Red Hat Bugzilla 2007-05-21 13:02:51 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2007-0343.html