Bug 176715

Summary: PHP Segfaults when using curl_init and uninialized variables
Product: Red Hat Enterprise Linux 4 Reporter: Fredrik Rambris <fredrik.rambris>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: mkoci
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-18 20:32:24 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:

Description Fredrik Rambris 2005-12-30 18:29:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/416.12 (KHTML, like Gecko) Safari/416.13

Description of problem:
When calling curl_init($variable) and $variable is not initalized (i.e. isset($variable) returns false) the 
module causes the thread to segfault.


Version-Release number of selected component (if applicable):
php-4.3.9-3.9

How reproducible:
Always

Steps to Reproduce:
1. call curl_init($variable) and see to it that $variable has not initialized


Actual Results:  The thread crashes leaving the following line in error_log
[Fri Dec 30 11:26:08 2005] [notice] child pid 19340 exit signal Segmentation fault (11)

Expected Results:  It should tread the variable as empty not null and continue with the statement as if I would have called 
curl_init()

Additional info:

The problem lies in that ext/curl/curl.c in curl_init() on row 688 gets the argument but doesn't check if it 
is null or not and just commences with a strncasecmp.

The problem has been fixed in the latest PHP trees (both 4.x and 5.x) from PHP.net. They now use a 
wrapper around the variable that handle NULL pointers etc.

Comment 2 RHEL Program Management 2008-02-01 19:13:42 UTC
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 3 RHEL Program Management 2008-09-05 17:11:39 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 errata-xmlrpc 2009-05-18 20:32:24 UTC
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.

http://rhn.redhat.com/errata/RHBA-2009-1013.html