From: "Serge E. Hallyn" If running a program which has file capabilities which are not a subset of the capabilities of the current task, reset pdeath_signal = 0 to prevent the task parent from (deliberately) signaling a more privileged app. Signed-off-by: Serge E. Hallyn Cc: Andrew Morgan Cc: Casey Schaufler Cc: Chris Wright Cc: James Morris Cc: Stephen Smalley Signed-off-by: Andrew Morton --- security/commoncap.c | 1 + 1 files changed, 1 insertion(+) diff -puN security/commoncap.c~capabilities-reset-current-pdeath_signal-when-increasing-capabilities security/commoncap.c --- a/security/commoncap.c~capabilities-reset-current-pdeath_signal-when-increasing-capabilities +++ a/security/commoncap.c @@ -267,6 +267,7 @@ void cap_bprm_apply_creds (struct linux_ if (bprm->e_uid != current->uid || bprm->e_gid != current->gid || !cap_issubset (new_permitted, current->cap_permitted)) { set_dumpable(current->mm, suid_dumpable); + current->pdeath_signal = 0; if (unsafe & ~LSM_UNSAFE_PTRACE_CAP) { if (!capable(CAP_SETUID)) { _