lkml.org 
[lkml]   [2012]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [PATCH] Reset current->pdeath_signal on SUID binary execution
Marcel,

On Sat, Aug 18, 2007 at 7:47 AM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Linus,
>
> the attached patch fixes a flaw in the "parent process death signal"
> when executing SUID binaries. An unprivileged user may send arbitrary
> signal to a child process even if it is running with higher privileges.
>
> The idea to fix this issue is to reset pdeath_signal not only on fork,
> but also on the execution of a SUID binary.
>
> Michael, if we fix it this way, then the prctl() manual page should
> reflect that behavior.

For man-pages-3.40, I applied the patch below.

Cheers,

Michael

--- a/man2/prctl.2
+++ b/man2/prctl.2
@@ -220,7 +220,9 @@ in the range 1..maxsig, or 0 to clear).
This is the signal that the calling process will get when its
parent dies.
This value is cleared for the child of a
-.BR fork (2).
+.BR fork (2)
+and (since Linux 2.5.36 / 2.6.23)
+when execing a set-user_ID or set-group-ID binary.
.TP
.BR PR_GET_PDEATHSIG " (since Linux 2.3.15)"
Return the current value of the parent process death signal,

--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/


\
 
 \ /
  Last update: 2012-04-23 11:39    [W:0.093 / U:0.272 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site