I found an overflow situation in php5.3.10.
Probably it's not 'something new', but if I can understand this, it will help me to find this kind of bug faster in the future.
What can I do to check how/what/where the exploitation occurs?
Steps I've already done are:
- I've got php5.3.10 on virtual machine installed
- I run code.php (and here is the sigsegv-situation)
- I can do 'bt', or 'where' in gdb /usr/bin/php5
... what can/should I do next?
-gto CFLAGS. (Hopefully the executable doesn't get stripped at some point later.) Some applications come with a "build with debug symbols" option in their Makefile; others require you to do it manually. You won't need--leak-checkor--show-reachable, but they won't do any harm. Now, look through the valgrind warnings (near the end of the log, probably). Odds are you may see asegvor anInvalid writeat the end; that may be your warning. It -- or the gdb backtrace -- should help pinpoint the line of code where the overflow occurred. – D.W. Nov 05 '12 at 11:02