|
|||||||||||
|
Re: glibc glob_filename() recurse call stack overflow (Re[2]: Bash Blues)
From: Roland Postle <mail(at)blazde.co.uk>
Date: Sat Feb 15 2003 - 20:54:06 EST
/* glob.c -- file-name wildcard pattern matching for Bash. [Copyright notice] /* To whomever it may concern: I have never seen the code which most Unix programs use to perform this function. I wrote this from scratch based on specifications for the pattern matching. --RMS. */ Sounds to me like it's unrelated to the glibc one. Regarding why it doesn't crash on some BSD systems, maybe they just have a bigger stack, or better exception handling. I think the reason it sometimes crashes in bcopy / alloca is just because it runs out of stack there instead of in the main body of glob_filename(). If you look at the call stack it'll be 99% glob_filename() calls. For example.... >eval `perl -e 'print ":;" x 97500'` This one is a stack overflow too.
(gdb) backtrace
etc.... Anyway, on the subject of exploiting stack overflows, I'm really only familiar with Windows (where they're only exploitable under some unlikely extreme conditions). I've been told Linux 2.4 isn't exploitable, but 2.2 might be, can anyone confirm or deny? The basic strategy is probably to run of the end of the stack into some heap memory, and create fake heap control blocks, as you would in a heap overflow.
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:38 EDT |
||||||||||
|
|||||||||||