From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Description of problem:
If executed from a shell prompt.
The following code fragment dumps core:
This has been tested with PHP Version 4.1.2 on a fully patched up:
Red Hat Linux release 7.0 (Guinness)
Kernel 2.2.19-7.0.16 on an i686
Red Hat Linux release 7.3 (Valhalla)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create the three line script
3. Segmentation fault (core dumped) OR
Actual Results: Segmentation fault
My scripts are broken. I don't know of a workaround.
Does anybody know of a way to capture STDIN without core dumping?
Core Dumps = Potential for exploit.
Removing security status, this isn't a security issue. A segmentation fault you
cause by crashing a program that is running as yourself isn't a vulnerability.
Thanks for the quick reply.
However, if this script is called from a webpage (php is after all a web
scripting language), and it creates a segmentation fault, then isn't there the
possibility that this could become a remote exploit? Not a root exploit, since
Apache no longer runs as root, but at least to the privlege level of the
Could a hosting client ftp the example script to a server and possibly obtain
Apache privleges by running the script from a browser?
Is this a security issue?
Thanks again for the prompt reply. I will let you be the judge.
I just finished a compile of PHP 4.2.2 from the RH 8.0 distribution, and it
does not core dump.
I copied the executable to /usr/bin/php422, and I call it explicitly from my
This is a satisfactory workaround for me.
You can go ahead and close this bug with the usual "Fixed in Rawhide".
Works for me in 8.0
I agree its security since hosting sites for example may allow secure php stuff
but this might allow shell access. Until we know why it crashes I think its a bug