Debian Bug report logs - #536317
php5: PCRE bug causes PHP to segfault

version graph

Package: libpcre3; Maintainer for libpcre3 is Mark Baker <mark@mnb.org.uk>; Source for libpcre3 is src:pcre3.

Reported by: Ray <ray@discountofficeitems.com>

Date: Thu, 16 Apr 2009 22:00:01 UTC

Severity: normal

Found in versions pcre3/6.7+7.4-4, pcre3/7.8-2

Fixed in version 8.02-1.1

Done: Stéphane Glondu <glondu@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#524409; Package php5. (Thu, 16 Apr 2009 22:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ray <ray@discountofficeitems.com>:
New Bug report received and forwarded. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Thu, 16 Apr 2009 22:00:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Ray <ray@discountofficeitems.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: php5: PCRE bug causes PHP to segfault
Date: Thu, 16 Apr 2009 16:45:31 -0500
Package: php5
Version: 5.2.0-8+etch13
Severity: normal

code that triggers the error, dug up from inside the zend framework
<?php

$q  = '\'';
$qe = '\\\\\'';
preg_replace("/$q($qe|\\\\{2}|[^$q])*$q/", '', str_pad('\'',6000, 'a'));

echo 'Success', PHP_EOL;

?>

output:
Segmentation fault

expected output:
Success

phpinfo() puts the pcre library at: 6.7.7.4 2008-07-04

It may be related to: http://bugs.exim.org/show_bug.cgi?id=809

-- System Information:
Debian Release: 4.0
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.24-etchnhalf.1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages php5 depends on:
ii  libapache2-mod-php5       5.2.0-8+etch13 server-side, HTML-embedded 
scripti
ii  php5-common               5.2.0-8+etch13 Common files for packages 
built fr

php5 recommends no packages.

-- no debconf information




Bug marked as found in version 5.2.9.dfsg.1-4. Request was from Raphael Geissert <geissert@debian.org> to control@bugs.debian.org. (Thu, 09 Jul 2009 03:03:03 GMT) Full text and rfc822 format available.

Bug 524409 cloned as bug 536317. Request was from Raphael Geissert <geissert@debian.org> to control@bugs.debian.org. (Thu, 09 Jul 2009 03:03:04 GMT) Full text and rfc822 format available.

Bug reassigned from package `php5' to `libpcre3'. Request was from Raphael Geissert <geissert@debian.org> to control@bugs.debian.org. (Thu, 09 Jul 2009 03:03:06 GMT) Full text and rfc822 format available.

Bug marked as found in version 7.8-2+b1. Request was from Raphael Geissert <geissert@debian.org> to control@bugs.debian.org. (Thu, 09 Jul 2009 03:03:06 GMT) Full text and rfc822 format available.

Blocking bugs of 524409 added: 536317 Request was from Raphael Geissert <geissert@debian.org> to control@bugs.debian.org. (Thu, 09 Jul 2009 03:03:08 GMT) Full text and rfc822 format available.

Reply sent to Stéphane Glondu <glondu@debian.org>:
You have taken responsibility. (Thu, 23 Sep 2010 06:30:03 GMT) Full text and rfc822 format available.

Notification sent to Ray <ray@discountofficeitems.com>:
Bug acknowledged by developer. (Thu, 23 Sep 2010 06:30:03 GMT) Full text and rfc822 format available.

Message #20 received at 536317-done@bugs.debian.org (full text, mbox):

From: Stéphane Glondu <glondu@debian.org>
To: 536317-done@bugs.debian.org
Subject: Bug fixed in Squeeze
Date: Thu, 23 Sep 2010 08:16:49 +0200
Version: 8.02-1.1

$ cat test.php
<?php

$q  = '\'';
$qe = '\\\\\'';
preg_replace("/$q($qe|\\\\{2}|[^$q])*$q/", '', str_pad('\'',6000, 'a'));

echo 'Success', PHP_EOL;

?>
$ php5 test.php
Success
$ echo $?
0

-- 
Stéphane





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 21 Oct 2010 07:31:00 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 21:33:03 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.