Bug 436153 (CVE-2008-0047)

Summary: CVE-2008-0047 cups: heap based buffer overflow in cgiCompileSearch()
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: kreilly, security-response-team, twaugh
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-09 06:22: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: 436338, 436339, 440040, 440041, 440042    
Bug Blocks:    
Attachments:
Description Flags
Upstream patch none

Description Tomas Hoger 2008-03-05 17:24:26 UTC
regenrecht has discovered a security issue affecting CUPS printing system, that
was reported to CUPS upstream via iDefense:

CUPS serves an interface on TCP port 631, which provides access to  
several CGI applications.

These applications are used to administer CUPS, and to provide
information about print jobs. These applications all use a common
search function called cgiCompileSearch(). This function takes a user
provided search expression, and compiles it into a regular expression.
By passing a malformed search request, an attacker can trigger a heap  
based buffer overflow.

In order to exploit this vulnerability remotely, the targeted host must
be sharing a printer(s) on the network. If a printer is not being
shared, CUPS only listens on the localhost interface, and the scope of
this vulnerability would be limited to local privilege escalation.

Versions affected:
CUPS 1.2.0 through 1.3.6

Upstream bug report:
http://www.cups.org/str.php?L2729

Acknowledgements:

Red Hat would like to thank "regenrecht" for reporting this issue.

Comment 1 Tomas Hoger 2008-03-05 17:25:43 UTC
Created attachment 296901 [details]
Upstream patch

Comment 2 Mark J. Cox 2008-03-06 12:15:29 UTC
This issue does not affect the version of cups as shipped in Red Hat Enterprise
Linux 3 or 4 (no help.cgi).

In Red Hat Enterprise Linux 5, help.cgi is included (as a PIE executable) and
runs as user lp group lp.

Comment 3 Mark J. Cox 2008-03-06 12:17:34 UTC
For CVSS v2 score using Access Vector: Local because by default the tcp
administrator interface is bound to localhost.

cvss2=4.6/AV:L/AC:L/Au:N/C:P/I:P/A:P

Comment 7 Mark J. Cox 2008-03-07 10:33:57 UTC
Downgrading to moderate severity.  By default on RHEL, CUPS binds the tcp
administration interface to localhost.  Successful exploitation of this flaw
would yield user 'lp' group 'lp' privileges, but confined by the targeted
SELinux policy, enabled by default.

Comment 8 Tomas Hoger 2008-03-19 07:30:42 UTC
Public now via APPLE-SA-2008-03-18:

  http://lists.apple.com/archives/security-announce/2008/Mar/msg00001.html

Lifting embargo.

Comment 11 Fedora Update System 2008-04-01 16:20:18 UTC
cups-1.2.12-10.fc7 has been submitted as an update for Fedora 7

Comment 12 Fedora Update System 2008-04-09 05:11:45 UTC
cups-1.3.6-4.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2008-04-09 05:13:08 UTC
cups-1.2.12-10.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.