How can Linux ptrace be unsafe or contain a race condition?

后端 未结 2 1702
既然无缘
既然无缘 2021-01-05 12:26

I\'d like to implement a sandbox by ptrace()ing a process I start and all its children would create (including grandchildren etc.). The ptrace() pa

2条回答
  •  一生所求
    2021-01-05 13:15

    Doesn't ptrace only get notifications after-the-fact? I don't think you have a chance to actually stop the syscall from happening, only to kill it as fast as you can once you see something "evil".

    It seems like you're more looking for something like SELinux or AppArmor, where you can guarantee that not even one illegal call gets through.

提交回复
热议问题