Bug 617232 (CVE-2010-1917, MOPS-2010-021)

Summary: CVE-2010-1917 php: fnmatch long pattern stack memory exhaustion (MOPS-2010-021)
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: fedora, jorton, rpm, vdanen
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: 2012-06-20 16:56:37 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: 624469, 626733, 626734, 626735, 626736, 626740    
Bug Blocks:    
Attachments:
Description Flags
Public MOPS-2010-021 reproducer none

Description Jan Lieskovsky 2010-07-22 14:47:52 UTC
Common Vulnerabilities and Exposures assigned an identifier CVE-2010-1917 to
the following vulnerability:

Stack consumption vulnerability in PHP 5.2 through 5.2.13 and 5.3 through
5.3.2 allows context-dependent attackers to cause a denial of service
(PHP crash) via a crafted first argument to the fnmatch function, as
demonstrated using a long string.

References:
  [1] http://www.php-security.org/2010/05/11/mops-2010-021-php-fnmatch-stack-exhaustion-vulnerability/index.html
  [2] http://xforce.iss.net/xforce/xfdb/58585

Comment 1 Jan Lieskovsky 2010-07-22 14:52:45 UTC
Created attachment 433721 [details]
Public MOPS-2010-021 reproducer

Comment 4 Jan Lieskovsky 2010-07-22 15:02:05 UTC
This issue affects the versions of the php package, as shipped
with Red Hat Enterprise Linux 3, 4, and 5.

This issue affects the versions of the php package, as shipped
with Fedora release of 12 and 13.

Comment 6 Tomas Hoger 2010-07-25 20:49:30 UTC
Upstream patch:
  http://svn.php.net/viewvc?view=revision&revision=298881

This flaw is similar to CVE-2007-4782 (see bug #285881), which covered similar problem for string rather than pattern fnmatch() argument.  Matching pattern is less likely to by exposed to untrusted inputs than string to match pattern against.

As with the previous CVE, this is not really a PHP flaw, rather a PHP-exposed glibc unsafe alloca() use.  PHP fix adds additional input argument size limits which works around this bug.

Comment 9 errata-xmlrpc 2010-11-29 21:34:25 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4
  Red Hat Enterprise Linux 5

Via RHSA-2010:0919 https://rhn.redhat.com/errata/RHSA-2010-0919.html

Comment 10 Vincent Danen 2010-11-29 22:36:40 UTC
Statement:

This issue is not planned to be fixed in Red Hat Enterprise Linux 3 due to this product being in Production 3 of its maintenance life-cycle, where only qualified security errata of important and critical impact are addressed.

For further information about the Errata Support Policy, visit:
http://www.redhat.com/security/updates/errata