lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170913171135.GB14063@redhat.com>
Date:   Wed, 13 Sep 2017 19:11:35 +0200
From:   Oleg Nesterov <oleg@...hat.com>
To:     Jürg Billeter <j@...ron.ch>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Eric Biederman <ebiederm@...ssion.com>,
        linux-kernel@...r.kernel.org,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Michael Kerrisk <mtk.manpages@...il.com>
Subject: Re: [PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

On 09/12, Jürg Billeter wrote:
>
> On Tue, 2017-09-12 at 19:05 +0200, Oleg Nesterov wrote:
> > On 09/09, Jürg Billeter wrote:
> > > Unlike
> > > PR_SET_PDEATHSIG, this is inherited across fork to allow killing a whole
> > > subtree without race conditions.
> > 
> > but I am still not sure this is right... at least I can't understand the
> > "without race conditions" above.
> > 
> > IOW, the child can do prctl(PR_SET_PDEATHSIG_PROC, SIGKILL) right after fork(),
> > why this is not enough to kill a whole subtree without race conditions?
> 
> What if the parent dies between fork() and prctl()?

The child will be killed? Sorry, can't understand...

> it also makes it relatively easy to enforce
> PDEATHSIG_PROC for all descendants of a process.

this is clear,

> > Say, CLONE_PARENT. Should it succeed if ->pdeath_signal_proc != 0 ?
>
> Yes, I don't see an issue with that. The new process will be a sibling
> and inheriting pdeath_signal_proc seems sensible to me for this.

I meant, the process created by clone(CLONE_PARENT) won't be killed by
pdeath_signal if the creator process exits, exactly because it won't be
its child. Not that I think this is wrong.

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ