Bug 871187 (CVE-2012-4552)

Summary: CVE-2012-4552 plib: stack-based buffer overflow in the error function in ssg/ssgParser.cxx
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: hdegoede, matthias
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20121008,reported=20121029,source=oss-security,cvss2=4.6/AV:L/AC:L/Au:N/C:P/I:P/A:P,fedora-all/plib=affected,cwe=CWE-121[auto]
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-20 12:53:07 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 871188    
Bug Blocks:    

Description Vincent Danen 2012-10-29 17:00:21 EDT
A stack-based buffer overflow flaw was reported [1] in how plib handles errors when loading 3d model files as X (Direct X), ASC, ASE, ATG, and OFF.  The description of the flaw follows:

Vulnerability Details: Plib is prone to stack based Buffer overflow in the
error function in ssg/ssgParser.cxx when it loads 3d model files as X
(Direct x), ASC, ASE, ATG, and OFF, if a very long error message is passed
to the function, in line 68:


// Output an error
void _ssgParser::error( const char *format, ... )
{
  char msgbuff[ 255 ];
  va_list argp;

  char* msgptr = msgbuff;
  if (linenum)
  {
    msgptr += sprintf ( msgptr,"%s, line %d: ",
      path, linenum );
  }

  va_start( argp, format );
68        vsprintf( msgptr, format, argp );
  va_end( argp );

  ulSetError ( UL_WARNING, "%s", msgbuff ) ;
}

I'm unsure whether or not this was reported upstream (there is no relevant bugs, and the last commit to ssgParser.cxx [2] was five years ago).

[1] http://www.openwall.com/lists/oss-security/2012/10/29/8
[2] http://plib.svn.sourceforge.net/viewvc/plib/trunk/src/ssg/ssgParser.cxx?view=log
Comment 1 Vincent Danen 2012-10-29 17:01:27 EDT
Created plib tracking bugs for this issue

Affects: fedora-all [bug 871188]
Comment 2 Vincent Danen 2012-10-31 14:31:01 EDT
plib is no longer being maintained upstream:

http://sourceforge.net/mailarchive/message.php?msg_id=28580157

This likely means we should determine whether or not we want to keep this package in Fedora, or what other upstream projects (like FlightGear) are going to do about this lack of maintenance.  Unfortunately this means we will need to come up with our own patch to fix this flaw.