Skip to content

Prevent unsupported signal injection #135

Description

@ranweiler

Currently, every Tracee carries a pending field, which can be modified. It should only be modified for signal-delivery-stops. This can lead to user confusion, as per the man page:

       Restarting ptrace commands issued in ptrace-stops other than
       signal-delivery-stop are not guaranteed to inject a signal, even
       if sig is nonzero.  No error is reported; a nonzero sig may simply
       be ignored.  Ptrace users should not try to "create a new signal"
       this way: use [tgkill(2)](https://man7.org/linux/man-pages/man2/tgkill.2.html) instead.

It would be nice to omit the signal in the event API, and especially to making it impossible to attempt setting it unless a stop was a signal-delivery-stop. At a minimum, we should return an error when attempting to set it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions