From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:54748 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751111AbcJCQjI (ORCPT ); Mon, 3 Oct 2016 12:39:08 -0400 Date: Mon, 3 Oct 2016 18:37:53 +0200 From: Oleg Nesterov To: Kees Cook Cc: Jann Horn , Alexander Viro , Roland McGrath , John Johansen , James Morris , "Serge E. Hallyn" , Paul Moore , Stephen Smalley , Eric Paris , Casey Schaufler , Andrew Morton , Janis Danisevskis , Seth Forshee , "Eric . Biederman" , Thomas Gleixner , Benjamin LaHaise , Ben Hutchings , Andy Lutomirski , Linus Torvalds , "linux-fsdevel@vger.kernel.org" , linux-security-module , "security@kernel.org" Subject: Re: [PATCH v2 2/8] exec: turn self_exec_id into self_privunit Message-ID: <20161003163753.GA6634@redhat.com> References: <1474663238-22134-1-git-send-email-jann@thejh.net> <1474663238-22134-3-git-send-email-jann@thejh.net> <20160930132046.GA12047@redhat.com> <20160930134404.GA12862@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 09/30, Kees Cook wrote: > > On Fri, Sep 30, 2016 at 6:44 AM, Oleg Nesterov wrote: > > forgot to mention... > > > > On 09/30, Oleg Nesterov wrote: > >> > >> On 09/23, Jann Horn wrote: > >> > > >> > One reason for doing this is that it prevents an attacker from sending an > >> > arbitrary signal to a parent process after performing 2^32-1 execve() > >> > calls. > > > > No, sets ->exit_signal = SIGCHLD. So the only problem is that the parent > > can do clone(SIGKILL), then do execve() 2^32-1 times, then it can be killed > > by SIGKILL from the exiting child. > > > > Honestly, I do not think this is security problem. > > It's a corner case, to be sure. But even sending a SIGKILL across > privilege boundaries should not be allowed to happen. Agreed, and actually I need to take my words back, of course this is not nice security-wise. So lets kill these counters. At least they should not live in task_struct. Oleg.