mmap(0,,,MAP_FIXED,,) is *useful*
Posted Jul 17, 2009 17:41 UTC (Fri) by jreiser
In reply to: Linux 2.6.30 exploit posted
Parent article: Linux 2.6.30 exploit posted
For over thirty years I have been using mmap(0,,,MAP_FIXED,,) to implement fraid, a file debugger. Invoke gdb on fraid, run with the name of the target file. fraid does open+fstat+mmap(0,.st_size,,MAP_FIXED,fd,0); then traps into gdb. That's the whole program: a dozen lines. The identity mapping from offset in the file to address in the address space of the debugger is exceedingly powerful. This is not something to give up, ever.
to post comments)