Granary / granary2

Dynamic binary translation framework for instrumenting x86-64 user space Linux programs
MIT License
39 stars 5 forks source link

Bug when running with no transparent returns on ls #43

Closed pgoodman closed 9 years ago

pgoodman commented 10 years ago

The following results in a segmentation fault.

./bin/release_linux_user/grr --no_transparent_returns --no_debug_gdb_prompt -- ls -la
pgoodman commented 10 years ago

This is related to Granary's general inability to instrument user space code without transparent return addresses. For a lot of code, transparency isn't an issue; however, there are some specific instanced without the dynamic loader where transparency is important.

pgoodman commented 9 years ago

I'm not convinced that this isn't a bug, given that the fundamental issue is really that the dynamic loader inspects return addresses. To "fix" this, I'd need to introduce a hack that looks for calls to the PLT that use the GOT and then go into the loader. Then, wave hands magic, make all the things work.