From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) Subject: Re: [PATCH 03/26] signal: Do not perform permission checks when sending pdeath_signal Date: Wed, 07 Jun 2017 06:23:12 -0500 Message-ID: <87fufcxcrj.fsf@xmission.com> References: <877f0pym71.fsf@xmission.com> <20170606190338.28347-1-ebiederm@xmission.com> <20170606190338.28347-3-ebiederm@xmission.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: (Linus Torvalds's message of "Tue, 6 Jun 2017 13:01:40 -0700") Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Linus Torvalds Cc: Linux Kernel Mailing List , Linux API , Oleg Nesterov , Ingo Molnar , Thomas Gleixner , Kees Cook , Roland McGrath , Al Viro , David Howells , "Michael Kerrisk (man-pages)" List-Id: linux-api@vger.kernel.org Linus Torvalds writes: > On Tue, Jun 6, 2017 at 12:03 PM, Eric W. Biederman > wrote: >> >> As this is more permisssive there is no chance anything will break. > > Actually, I do worry about the security issues here. > > The thing is, the parent may be some system daemon that wants to catch > SIGCHLD, but we've used prctl and changed pdeath_signal to something > else (like SIGSEGV or something). > > Do we really want to be able to kill a system daemon that we couldn't > use kill() on directly, just because that system daemon spawned us? > > So I think those permission checks may actually be a good idea. > Although possibly they should be in prctl().. To be clear. pdeath signal is the signal we receive when our parent dies. It is the parent death signal. AKA when the system daemon (or whatever is dies) what signal does the child process that called the prctl get? There is no chance of killing the system daemon that spawned us, as the signal only gets sent to ourselves. Eric