PHP segfault on self referencing include

|
Honestly, I expected this to be somewhat gracefully handled;

1justanotherhacker:~$ cat crash.php<br>
2<?php<br>
3include('crash.php');<br>
4?><br>
5justanotherhacker:~$ php crash.php<br>
6Segmentation fault


The backtrace is;
01justanotherhacker:~$ gdb php<br>
02GNU gdb 6.8-debian<br>
03Copyright (C) 2008 Free Software Foundation, Inc.<br>
04License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html<br>
05This is free software: you are free to change and redistribute it.<br>
06There is NO WARRANTY, to the extent permitted by law.  Type "show copying"<br>
07and "show warranty" for details.<br>
08This GDB was configured as "i486-linux-gnu"...<br>
09(no debugging symbols found)<br>
10(gdb) run crash.php<br>
11Starting program: /usr/bin/php crash.php<br>
12(no debugging symbols found)<br>
13<snip><br>
14(no debugging symbols found)<br>
15[Thread debugging using libthread_db enabled]<br>
16(no debugging symbols found)<br>
17(no debugging symbols found)<br>
18[New Thread 0xb780e6d0 (LWP 9508)]<br>
19(no debugging symbols found)<br>
20(no debugging symbols found)<br>
21<br>
22Program received signal SIGSEGV, Segmentation fault.<br>
23[Switching to Thread 0xb780e6d0 (LWP 9508)]<br>
240x082874fb in virtual_file_ex ()<br>
25(gdb) bt<br>
26#0  0x082874fb in virtual_file_ex ()<br>
27#1  0x0828fcff in expand_filepath ()<br>
28#2  0x082a686b in _php_stream_fopen ()<br>
29#3  0x082a6e63 in _php_stream_fopen_with_path ()<br>
30#4  0x082a6f83 in ?? ()<br>
31#5  0x09a007ec in ?? ()<br>
32#6  0x08357b15 in ?? ()<br>
33#7  0x08502620 in ?? ()<br>
34#8  0xbf09135c in ?? ()<br>
35#9  0x00000085 in ?? ()<br>
36#10 0x00000001 in ?? ()<br>
37#11 0x00000000 in ?? ()<br>

It doesn't appear to be anything more then a potential dos condition to me, but I could be wrong.
No Clean Feed - Stop Internet Censorship in Australia
Creative Commons License
This weblog is licensed under a Creative Commons License.