mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Josh Triplett <josh@joshtriplett.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"Theodore Ts'o" <tytso@mit.edu>,
	Kees Cook <keescook@chromium.org>,
	mtk.manpages@gmail.com, linux-api@vger.kernel.org,
	linux-man@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add supplementary UIDs, and getusers/setusers system calls
Date: Thu, 20 Nov 2014 09:14:50 -0600	[thread overview]
Message-ID: <87egsxnbth.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <6b6bef0eb7328d466e8deef3d2c186a79633e0a7.1416121601.git.josh@joshtriplett.org> (Josh Triplett's message of "Sat, 15 Nov 2014 23:08:32 -0800")

Josh Triplett <josh@joshtriplett.org> writes:

> Analogous to the supplementary GID list, the supplementary UID list
> provides a set of additional user credentials that a process can act as.
> A process with CAP_SETUID can set its UID list arbitrarily; a process
> without CAP_SETUID can only reduce its UID list.
>
> This allows each user to have a set of UIDs that they can then use to
> further sandbox individual child processes without first escalating to
> root to change UIDs.  For instance, a PAM module could give each user a
> block of UIDs to work with.

A couple of quick comments on this patch.

1) user namespaces already allow you to do this.

2) After having looked at the group case I am afraid this intersects in
   an unfortunate way with user namespaces.

3) This intersects in a very unfortunate way with setresuid.
   Applications that today know they are dropping all privileges
   won't be dropping all privielges with this change.  Which sounds like
   a recipe for a security exploit to me.

Eric

  parent reply	other threads:[~2014-11-20 15:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-16  7:08 Josh Triplett
2014-11-16  7:08 ` [PATCH manpages] Document supplementary user IDs Josh Triplett
2014-11-16  7:41 ` [PATCH] Add supplementary UIDs, and getusers/setusers system calls Josh Triplett
2014-11-20 15:14 ` Eric W. Biederman [this message]
2014-11-20 17:59   ` josh
2014-11-20 18:18   ` Andy Lutomirski

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=87egsxnbth.fsf@x220.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=akpm@linux-foundation.org \
    --cc=josh@joshtriplett.org \
    --cc=keescook@chromium.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=tytso@mit.edu \
    /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