mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	David Howells <dhowells@redhat.com>,
	Ashwin Ganti <ashwin.ganti@gmail.com>, Greg KH <greg@kroah.com>,
	rsc@swtch.com, ericvh@gmail.com,
	linux-security-module@vger.kernel.org,
	Ron Minnich <rminnich@gmail.com>,
	jt.beard@gmail.com, Andrew Morton <akpm@linux-foundation.org>,
	Andrew Morgan <morgan@kernel.org>,
	oleg@us.ibm.com, Eric Paris <eparis@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	linux-api@vger.kernel.org, Randy Dunlap <rdunlap@xenotime.net>
Subject: Re: [PATCH 3/3] p9auth: add p9auth driver
Date: Wed, 21 Apr 2010 15:19:17 +0100	[thread overview]
Message-ID: <20100421151917.5ae20265@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <20100421133917.GB16326@us.ibm.com>

> sorry I thought I had cc:d you, bc I was pretty sure you'd have some
> neat ideas.  Like this one.
> 
> One could try to argue that this makes every linux process susceptible
> to a trojan making it grant its userid to other tasks, but of course
> that's silly since the trojan could just fork.  Well, what this would
> buy the attacker is the ability to sit inconspicuously under his old
> userid, holding on to the fd until the admin goes out to coffee before
> switching userids.

Possibly, could you put a timestamp in the passed object ? (Given the
expiry of such a uid offer is kind of policy)

> The other thing is that offhand I think the server can't easily tell
> from the socket which user namespace the client is in, as ucred only
> has .uid.  Though (1) we might need to create a 'struct puser' analogous
> to 'struct pid' for signals anyway, (2) userspace can segragate with
> fs or net_ns (if abstract sock), and (3) client in a container
> presumably won't be able to authenticate itself to server on the
> host anyway.

That I think needs fixing anyway and now is a good time as any to do it.
If you are going to be able to pass userids then you need to be sure you
don't get passed a handle with a uid change on it that you didn't want so
adding another object type and option of some kind to accept them has to
occur anyway.

That also btw needs fixing for other reasons - more than one daemon has
been written that generically uses recvmsg and so can be attacked with FD
leaks >-)

Alan

  reply	other threads:[~2010-04-21 14:15 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-21  1:27 [PATCH 1/3] p9auth: split core function out of some set*{u,g}id functions Serge E. Hallyn
2010-04-21  1:28 ` [PATCH 2/3] p9auth: add CAP_GRANT_ID to authorize use of /dev/caphash Serge E. Hallyn
2010-04-21  2:54   ` Greg KH
2010-04-21  1:29 ` [PATCH 3/3] p9auth: add p9auth driver Serge E. Hallyn
2010-04-21  3:04   ` Greg KH
2010-04-21  3:45     ` Serge E. Hallyn
2010-04-21  4:18       ` Ashwin Ganti
2010-04-21 13:47         ` Serge E. Hallyn
2010-04-21 14:44           ` Ashwin Ganti
2010-04-21  4:45       ` Eric W. Biederman
2010-04-21 13:21         ` Serge E. Hallyn
2010-04-24  3:36         ` Serge E. Hallyn
2010-04-24 16:25           ` ron minnich
2010-04-24 18:01             ` Eric W. Biederman
2010-04-25  3:24               ` Serge E. Hallyn
2010-04-21  9:27   ` Alan Cox
2010-04-21 13:39     ` Serge E. Hallyn
2010-04-21 14:19       ` Alan Cox [this message]
2010-04-21 15:09         ` Serge E. Hallyn
2010-04-21 19:15           ` Eric W. Biederman
2010-04-21 20:23             ` Serge E. Hallyn
2010-04-22  4:57             ` Kyle Moffett
2010-04-22 14:36               ` Serge E. Hallyn
2010-04-21 13:55     ` Eric Paris
2010-04-21 14:30       ` Serge E. Hallyn
2010-04-21 10:46 ` [PATCH 1/3] p9auth: split core function out of some set*{u,g}id functions David Howells
2010-04-21 13:40   ` Serge E. Hallyn
2010-04-21 10:49 ` [PATCH 3/3] p9auth: add p9auth driver David Howells
2010-04-21 13:40   ` Serge E. Hallyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100421151917.5ae20265@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=ashwin.ganti@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=eparis@redhat.com \
    --cc=ericvh@gmail.com \
    --cc=greg@kroah.com \
    --cc=jt.beard@gmail.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=morgan@kernel.org \
    --cc=oleg@us.ibm.com \
    --cc=rdunlap@xenotime.net \
    --cc=rminnich@gmail.com \
    --cc=rsc@swtch.com \
    --cc=serue@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome