From: judas dot iscariote at gmail dot com
Operating system: linux
PHP version: 5CVS-2007-02-26 (CVS)
PHP Bug Type: Reproducible crash
Bug description: invalid pointer in ext/standard/head.c(140)

Description:
------------
Current 5_2 seems to have a buffer overflow this issue is not present in
released versions.

this can be reproduced with php compiled in debug mode.

Reproduce code:
---------------
I dont have reproduce code atm, but it is as easy to load
phpmyadmin,log-in (auth type cookie) and the error happends inmediately
and permanent.

Expected result:
----------------
no error

Actual result:
--------------
Script: '/srv/www/htdocs/sql/index.php'
---------------------------------------
/home/cristian/php5/ext/standard/head.c(140) : Block 0x00EA1EC8 status:
Beginning: OK (allocated on /home/cristian/php5/main/spprintf.c:222,
79 bytes)
Start: OK
End: Overflown (magic=0x00000073 instead of 0xBBA15242)
At least 4 bytes overflown
---------------------------------------
[Sun Feb 25 22:49:43 2007] Script: '/srv/www/htdocs/sql/index.php'
---------------------------------------
/home/cristian/php5/ext/standard/head.c(140) : Block 0x010914A8 status:
Invalid pointer: ((size=0x000000A9) != (next.prev=0x74617020))
---------------------------------------

hell:~ # rclighttpd restart
Shutting down lighttpd
done
Starting lighttpd
done
hell:~ # [Sun Feb 25 22:50:07 2007] Script:
'/srv/www/htdocs/sql/index.php'
---------------------------------------
/home/cristian/php5/ext/standard/head.c(140) : Block 0x00EA1EC8 status:
Beginning: OK (allocated on /home/cristian/php5/main/spprintf.c:222,
79 bytes)
Start: OK
End: Overflown (magic=0x00000073 instead of 0x7B97D628)
At least 4 bytes overflown
---------------------------------------
[Sun Feb 25 22:50:08 2007] Script: '/srv/www/htdocs/sql/index.php'
---------------------------------------
/home/cristian/php5/ext/standard/head.c(140) : Block 0x010914A8 status:
Invalid pointer: ((size=0x000000A9) != (next.prev=0x3D687461))
---------------------------------------


--
Edit bug report at [url]http://bugs.php.net/?id=40634&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40634&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40634&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40634&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40634&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=40634&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=40634&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40634&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=40634&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=40634&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=40634&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=40634&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=40634&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=40634&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40634&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=40634&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=40634&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40634&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=40634&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40634&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40634&r=mysqlcfg[/url]