From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751527AbdFGLaJ (ORCPT ); Wed, 7 Jun 2017 07:30:09 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:40601 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbdFGLaG (ORCPT ); Wed, 7 Jun 2017 07:30:06 -0400 From: ebiederm@xmission.com (Eric W. Biederman) 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\)" References: <877f0pym71.fsf@xmission.com> <20170606190338.28347-1-ebiederm@xmission.com> <20170606190338.28347-3-ebiederm@xmission.com> Date: Wed, 07 Jun 2017 06:23:12 -0500 In-Reply-To: (Linus Torvalds's message of "Tue, 6 Jun 2017 13:01:40 -0700") Message-ID: <87fufcxcrj.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1dIZ9z-00014v-Hz;;;mid=<87fufcxcrj.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=97.121.81.159;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX19SNIc4JZ7rmTszvRskgC2wQaeLucf2Qno= X-SA-Exim-Connect-IP: 97.121.81.159 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Linus Torvalds X-Spam-Relay-Country: X-Spam-Timing: total 5684 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 2.9 (0.1%), b_tie_ro: 2.0 (0.0%), parse: 1.00 (0.0%), extract_message_metadata: 16 (0.3%), get_uri_detail_list: 1.36 (0.0%), tests_pri_-1000: 7 (0.1%), tests_pri_-950: 1.13 (0.0%), tests_pri_-900: 0.98 (0.0%), tests_pri_-400: 22 (0.4%), check_bayes: 21 (0.4%), b_tokenize: 5 (0.1%), b_tok_get_all: 6 (0.1%), b_comp_prob: 1.96 (0.0%), b_tok_touch_all: 4.1 (0.1%), b_finish: 0.66 (0.0%), tests_pri_0: 178 (3.1%), check_dkim_signature: 0.54 (0.0%), check_dkim_adsp: 2.8 (0.0%), tests_pri_500: 5451 (95.9%), poll_dns_idle: 5445 (95.8%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH 03/26] signal: Do not perform permission checks when sending pdeath_signal X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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