DynamoRIO / DynamoRIO/dynamorio

ptrace injection should avoid relying on the app stack

Open
#1,117 0 comments 0 reactions 0 assignees View on GitHub
Migrated OpSys-Linux Priority-Low
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.