DynamoRIO / DynamoRIO/dynamorio

Linux internal attach fails for non-CLONE_SIGHAND and non-CLONE_THREAD threads

Open
#2,111 0 comments 0 reactions 0 assignees View on GitHub
OpSys-Linux
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

Xref original #722.

We've known this as we rely on only iterating /proc/self/task but never filed an official issue.

Fortunately: "Since Linux 2.5.35, flags must also include CLONE_SIGHAND if CLONE_THREAD
is specified."

Thus we are only worried about non-CLONE_THREAD threads. If they have CLONE_SIGHAND we could presumably do a simple tweak to look in /proc/self/task/nnn/children and then recurse from there.

If they do not have either flag, we only have two reasonable solutions: craft some ptrace-based solution where we fork a helper process, or use app cooperation.

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.