DynamoRIO / DynamoRIO/dynamorio
signal between set_at_syscall() and syscall itself can cause DR to skip the syscall on resumption from the signal handler
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 30
Description
This was discovered at https://github.com/DynamoRIO/dynamorio/issues/6105#issuecomment-1613831596
Looks like record_pending_signal() checks get_at_syscall() and it will go
back to dispatch and deliver the signal whether the syscall was actually
started or not. But: dispatch calls handle_post_system_call() based on
get_at_syscall: so it would invoke post-syscall even if it never made it to
the syscall? That means DR would continue on as though the syscall had
executed when really it hadn't?!? Sure looks that way: asynch_target will
be post-syscall from the exit stub.
To solve this skipped syscall: record_pending_signal() needs to look at
where in the gencode the signal interrupted.
This is a theoretical problem: it's not clear we've ever observed it; but maybe it
could explain some undiagnosed stability issues.
Contributor guide
Assessment
This issue has not been assessed yet.