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]
Date:	Fri, 23 Aug 2013 15:59:23 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andy Lutomirski <luto@...capital.net>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Brad Spengler <spender@...ecurity.net>,
	Colin Walters <walters@...hat.com>,
	Pavel Emelyanov <xemul@...allels.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] fork: unify and tighten up
	CLONE_NEWUSER/CLONE_NEWPID checks

On 08/22, Andy Lutomirski wrote:
>
> On Thu, Aug 22, 2013 at 11:32 AM, Oleg Nesterov <oleg@...hat.com> wrote:
> > On 08/22, Andy Lutomirski wrote:
> >>
> >> On Thu, Aug 22, 2013 at 11:15 AM, Oleg Nesterov <oleg@...hat.com> wrote:
> >> >
> >> > Yes. Before this patch do_fork() did:
> >> >
> >> >         if (clone_flags & (CLONE_NEWUSER | CLONE_NEWPID)) {
> >> >                 if (clone_flags & (CLONE_THREAD|CLONE_PARENT))
> >> >                         return -EINVAL;
> >> >         }
> >> >
> >> > however, let me repeat, CLONE_PARENT after unshare(CLONE_NEWPID) was
> >> > allowed. With this patch CLONE_PARENT is nacked in both cases.
> >>
> >> Is this -stable-worthy?
> >
> > Honestly, I do not know. I do not want to abuse -stable, and I will
> > sleep better if this patch won't go into the stable trees ;)
> >
> > OTOH, I think that at least 1/3 is probably -stable material... Since
> > I am going to send v2, I would not mind to add stable@...r.kernel.org
> > if both you and Eric agree.
>
> This may allow creation of a process with tgid and pid in different
> pid namespaces.  If so, I have no idea what the consequences would be.

and share the parent with the creator.

Not good. But probably not too bad, one can abuse ->pidns_install()
anyway, create a child in another ns, exit. Like it or not but pid_ns
is "special" and you even sent the patch to reflect this sad^W fact.

Anyway. The main point of this patch is the consistency (plus imho it
cleanups/simplifies the code). Both CLONE_NEWPID and
"task_active_pid_ns() != pid_ns" create a task in another namespace,
we should use the same restrictions.

And you seem to agree with this change, can I take it as your ack ?
I am going to preserve your acks in 1-2 and resend.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ