You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PR_SET_PDEATHSIG is racy unless there is a check for the parent having already died #700
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.
PR_SET_PDEATHSIG can be circumvented by a subsequent call
I don't know what scenario you have in mind, but if you believe you have found a security vulnerability, please report it privately.
As far as I'm aware, bwrap's --die-with-parent is intended to be a convenience to get helper processes cleaned up automatically, rather than a security mechanism, so it's considered to be OK if there are ways it might not work. (But I'll defer to the authors of bubblewrap on this, if they have an opinion.)
PR_SET_PDEATHSIG can be circumvented by a subsequent call
I don't know what scenario you have in mind, but if you believe you have found a security vulnerability, please report it privately.
As far as I'm aware, bwrap's --die-with-parent is intended to be a convenience to get helper processes cleaned up automatically, rather than a security mechanism, so it's considered to be OK if there are ways it might not work. (But I'll defer to the authors of bubblewrap on this, if they have an opinion.)
That this is racy is well-known, so I didn't see this as a security vulnerability.
As far as I'm aware, bwrap's --die-with-parent is intended to be a convenience to get helper processes cleaned up automatically, rather than a security mechanism
Would it be of possible to document limitations/non-goals like this more clearly. Eg. in a CAVEATS section in the man page?
I tried to get this fixed in the kernel but the maintainers didn't seem to be interested. They recommend using cgroups to ensure that process trees are cleaned up.
Activity
smcv commentedon Sep 9, 2025
I don't know what scenario you have in mind, but if you believe you have found a security vulnerability, please report it privately.
As far as I'm aware, bwrap's
--die-with-parentis intended to be a convenience to get helper processes cleaned up automatically, rather than a security mechanism, so it's considered to be OK if there are ways it might not work. (But I'll defer to the authors of bubblewrap on this, if they have an opinion.)DemiMarie commentedon Sep 9, 2025
That this is racy is well-known, so I didn't see this as a security vulnerability.
sertonix commentedon Nov 17, 2025
Would it be of possible to document limitations/non-goals like this more clearly. Eg. in a
CAVEATSsection in the man page?DemiMarie commentedon Nov 18, 2025
I tried to get this fixed in the kernel but the maintainers didn't seem to be interested. They recommend using cgroups to ensure that process trees are cleaned up.
sertonix commentedon Sep 4, 2026
Would the guarantees provided by
CLONE_PIDFD_AUTOKILLallow for an option with security promises?DemiMarie commentedon Sep 6, 2026
Maybe? The problem is that it isn’t transitive, and I don’t think it is synchronous either.