containers / containers/bubblewrap
`PR_SET_PDEATHSIG` is racy unless there is a check for the parent having already died
- Dominant language
- C
- Stars
- 8.7k
- Forks
- 386
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 11
Description
If the parent process has died already, `PR_SET_PDEATHSIG` is a no-op. I consider this a kernel bug, but there is a workaround: if one knows what the parent process’s PID _should_ be, one can compare the return value of `getppid()` to it. If they are different, raise the appropriate signal.
`PR_SET_PDEATHSIG` can be circumvented by a subsequent call unless it is blocked by seccomp, blocked by an LSM (like Yama), or bubblewrap is not dumpable and no other process in the same or child PID namespace has `CAP_SYS_PTRACE`. Bubblewrap should probably mark itself as non-dumpable to protect against the last scenario.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.