Bug 486651 - Reproducible segmentation fault with php mbstring module
Reproducible segmentation fault with php mbstring module
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: php (Show other bugs)
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Joe Orton
Depends On:
  Show dependency treegraph
Reported: 2009-02-20 15:45 EST by Arturas Moskvinas
Modified: 2010-03-30 04:24 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-03-30 04:24:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch fixing the double free problem (backported from php-snap) (631 bytes, patch)
2009-02-20 15:45 EST, Arturas Moskvinas
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
PHP Bug Tracker 47245 None None None Never

  None (edit)
Description Arturas Moskvinas 2009-02-20 15:45:59 EST
Created attachment 332754 [details]
Patch fixing the double free problem (backported from php-snap)

Description of problem:
Reproducible php mbstring module segmentation fault when not supported charset is used.

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

How reproducible:

Steps to Reproduce:
1. Install php-mbstring module
2. Execute this php script (through apache or cli):
  $str = "\357\277\357\277\275\357\277\275\357\277\275\357\277\275";
  $charset = mb_detect_encoding($str , "WINDOWS-1255,ASCII");
  echo "detect $charset\n";
  $str = mb_convert_encoding($str, "UTF-8", $charset);
  echo "convert %str\n";

Actual results:
PHP Warning:  mb_detect_encoding(): Illegal argument in /root/- on line 3
detect UTF-8
convert %str
*** glibc detected *** php: double free or corruption (out): 0x000000001335ced0 ***

Expected results:
PHP Warning:  mb_detect_encoding(): Illegal argument in /root/- on line 3
detect UTF-8
convert %str

Additional info:
Php bug report: http://bugs.php.net/bug.php?id=47245
Comment 1 Joe Orton 2009-02-23 07:08:13 EST
Thanks for the report.
Comment 2 RHEL Product and Program Management 2009-03-26 13:07:13 EDT
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 4 Joe Orton 2009-12-16 07:42:55 EST
I've made test packages available which should fix this issue.  These
packages are unsupported, have not been through the standard Red Hat
QA process, and are not recommended for use on production systems.


Use of these packages may prevent you from (automatically) upgrading
to any asynchronous security errata which are issued before the
release of RHEL 5.5 due to version mismatches.

Please record any feedback on use of these test packages (positive or
negative!) on this bug report.
Comment 6 Arturas Moskvinas 2009-12-21 16:18:28 EST
I do not have anymore access to application which had that bug, I can only confirm that test case works correctly on x86_64 server.
Comment 9 errata-xmlrpc 2010-03-30 04:24:45 EDT
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 therefore 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.


Note You need to log in before you can comment on or make changes to this bug.