Bug 478848 (CVE-2008-5557)

Summary: CVE-2008-5557 php: Heap-based buffer overflow in the mbstring extension via crafted string containing a HTML entity (arb code execution)
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: fedora, jorton, kreilly, mmenkhof, vdanen
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c?r1=1.7&r2=1.8&view=patch
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-29 09:24:51 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: 487359, 487360, 487361, 487368, 487369, 487370, 487371    
Bug Blocks:    
Attachments:
Description Flags
Reproducer from the upsteam bug none

Description Jan Lieskovsky 2009-01-05 16:13:49 UTC
Common Vulnerabilities and Exposures assigned an identifier CVE-2008-5557 to
the following vulnerability:

Heap-based buffer overflow in
ext/mbstring/libmbfl/filters/mbfilter_htmlent.c in the mbstring
extension in PHP 4.3.0 through 5.2.6 allows context-dependent
attackers to execute arbitrary code via a crafted string containing an
HTML entity, which is not properly handled during Unicode conversion,
related to the (1) mb_convert_encoding, (2) mb_check_encoding, (3)
mb_convert_variables, and (4) mb_parse_str functions.

References:
http://archives.neohapsis.com/archives/fulldisclosure/2008-12/0477.html
http://bugs.php.net/bug.php?id=45722
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c?r1=1.7&r2=1.8
http://www.php.net/ChangeLog-5.php#5.2.7
http://www.securityfocus.com/bid/32948
http://securitytracker.com/id?1021482
http://xforce.iss.net/xforce/xfdb/47525

Comment 3 Josh Bressers 2009-03-05 19:43:03 UTC
Created attachment 334188 [details]
Reproducer from the upsteam bug

Comment 7 errata-xmlrpc 2009-04-06 16:38:08 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2009:0338 https://rhn.redhat.com/errata/RHSA-2009-0338.html

Comment 8 errata-xmlrpc 2009-04-06 16:51:08 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 3
  Red Hat Enterprise Linux 4

Via RHSA-2009:0337 https://rhn.redhat.com/errata/RHSA-2009-0337.html

Comment 9 errata-xmlrpc 2009-04-14 17:14:39 UTC
This issue has been addressed in following products:

  Red Hat Web Application Stack for RHEL 5

Via RHSA-2009:0350 https://rhn.redhat.com/errata/RHSA-2009-0350.html

Comment 10 Tomas Hoger 2009-04-15 08:05:40 UTC
Upstream fix:
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c?r1=1.7&r2=1.8

First appeared upstream in 5.2.7.

Comment 11 Fedora Update System 2009-05-30 02:34:05 UTC
maniadrive-1.2-13.fc10, php-5.2.9-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2009-05-30 02:38:10 UTC
maniadrive-1.2-13.fc9, php-5.2.9-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.