longld / peda

PEDA - Python Exploit Development Assistance for GDB
Other
5.85k stars 803 forks source link

bugs in get_vmmap and multithread #35

Open wapiflapi opened 10 years ago

wapiflapi commented 10 years ago

The get_vmmap() function in peda.py is used to get virtual memory address ranges of the debugged process. The problem is this is not process specific, it is actualy thread specific.

A simple example under linux is when the main thread of thread group exits /proc/pid/maps will be empty, instead it should parse /proc/pid/tasks/tid/maps.

Another problem might be that this function is memoized which might not be a good idea, you don't know if the address is invalid now just because it was invalid before.

I might fix this when I have some time in a couple weeks but can't right now.

wapiflapi commented 10 years ago

Just an update, I do have a quickfix on my branch. but everything is very messy over there because I changed a couple things very quickly because I needed it and didn't have time to do it nicely. I will clean it up one day but don't hold your breath.