Bug #70295 [Com]: Segmentation fault with setrawcookie
| From: | neclimdul at gmail dot com | Date: | Tue, 18 Aug 2015 23:52:20 +0000 |
| Subject: | Bug #70295 [Com]: Segmentation fault with setrawcookie | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-195316@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70295&edit=1
ID: 70295
Comment by: neclimdul at gmail dot com
Reported by: neclimdul at gmail dot com
Summary: Segmentation fault with setrawcookie
Status: Closed
Type: Bug
Package: *Network Functions
Operating System: linux
PHP Version: 7.0.0beta3
Block user comment: N
Private report: N
New Comment:
So fast it made my head spin. Confirmed it fixed the failure in Drupal we where seeing! Thanks!
Previous Comments:
------------------------------------------------------------------------
[2015-08-18 23:33:36] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4df77a6c5852a8ba0ccb1a10e01a49c71d1f54b5
Log: Fixed bug #70295 (Segmentation fault with setrawcookie)
------------------------------------------------------------------------
[2015-08-18 22:52:09] neclimdul at gmail dot com
Description:
------------
setrawcookie seems to be the cause of this bug but it actually requires a couple things to trigger.
The rawurlencode and the PDO statement seem required.
I'm not sure how to get gdb working right with php-fpm where I triggered this bug. Because of
the cookie involved it obviously doesn't work from the command line though.
Test script:
---------------
<?php
setrawcookie('cookie', rawurlencode('value'), $_SERVER['REQUEST_TIME']
+ 31536000, '/');
$dbh = new PDO('mysql:host=localhost;dbname=data', 'root', '');
Expected result:
----------------
cookie is set
Actual result:
--------------
502 response and SIGSEGV in log
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70295&edit=1