DynamoRIO / DynamoRIO/dynamorio
ptrace attach does not copy all state to the injection context
Open
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 30
Description
`user_regs_to_mc()` does not copy the NZCV flags, fpcr or fpsr on AArch64 and it does not copy the SIMD register state on any platform.
Any registers that are not copied get zeroed which will corrupt the app state if they are in use at the time DynamoRIO attaches.
Contributor guide
Research direction
Start by locating user_regs_to_mc() in the ptrace attach path and inspect how the injection context is populated. Ensure the AArch64 NZCV, fpcr, and fpsr flags and SIMD register state on all platforms are copied rather than zeroed, then verify that attaching preserves the application's register state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100