DynamoRIO / DynamoRIO/dynamorio
ptrace injection should avoid relying on the app stack
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
_From [rnk@google.com](https://code.google.com/u/rnk@google.com/) on March 13, 2013 16:54:47_
The initial ptrace injection implementation from r1877 uses the application stack to materialize a pointer to a string embedded in the injected code stream. This can break if the app SP is invalid or is close to a page boundary, and we can avoid it.
Here's the current code sequence:
call after_string
.ascii "/path/to/open"
after_string:
...
We know the PC we're injecting code at, so we could do something like this which isn't PIC:
mov $ -> %arg_reg
jmp after_string
string_label:
.ascii "/path/to/open"
after_string:
...
_Original issue: http://code.google.com/p/dynamorio/issues/detail?id=1117_
Contributor guide
Assessment
This issue has not been assessed yet.