public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Nyberg <alexn@telia.com>
To: David Wagner <daw-usenet@taverner.cs.berkeley.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] capabilities not inherited
Date: Thu, 09 Jun 2005 12:32:47 +0200	[thread overview]
Message-ID: <1118313167.970.15.camel@localhost.localdomain> (raw)
In-Reply-To: <d88ba7$hck$1@abraham.cs.berkeley.edu>

tor 2005-06-09 klockan 02:59 +0000 skrev David Wagner:
> Alexander Nyberg  wrote:
> >btw since the last discussion was about not changing the existing
> >interface and thus exposing security flaws, what about introducing
> >another prctrl that says maybe PRCTRL_ACROSS_EXECVE?
> 
> Not sure if I understand the semantics you are proposing.
> 
> I remember that the sendmail attack involved the attacker clearing
> its SETUID capability bit, then execing sendmail.  Sendmail, the victim,
> got executed with fewer capabilities than it expected, and this caused it
> to fail (in particular, sendmail's attempt to drop privileges silently
> failed) -- leading to a security hole.  Will your proposal prevent such
> attacks?  I'm worried.

I'll look this up but it sounds very weird and I don't see how this
would happen with this change.

> >Any new user-space applications must understand the implications of
> >using it so it's safe in that aspect. Yes?
> 
> Not clear.  Suppose Alice exec()s Bob.  
> 
> Does your scheme protect Alice against a malicious Bob?  Yes, because
> Alice has to know about PRCTRL_ACROSS_EXECVE to use it.

Yeah but for capabilities to be useful it needs to be recursive too, ie.
Alice runs Bob that in turn runs Joe. Joe should now have the
capabilities that Alice had if Alice had set PCRTL_ACROSS_EXECVE and Bob
did not drop the PRCTL flag nor zeroed the inheritable mask.

> Does your scheme protect Bob against a malicious Alice?  Not clear.
> If Alice is the only who has to set PRCTRL_ACROSS_EXECVE, then Bob might
> not know about this flag and thus might be surprised by the implicatiohns
> of this flag.  Consequently, I can imagine this flag might allow Alice
> to attack Bob by exec()ing Bob with a different set of capabilities than
> Bob was expecting.  Does this sound right?

That would require Alice to already have the capabilities. No extra
capabilities are gained by exec'ing, it's only about inheriting the
existing ones.


  reply	other threads:[~2005-06-09 10:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-08 20:27 [PATCH] capabilities not inherited Manfred Georg
2005-06-08 20:41 ` Alexander Nyberg
2005-06-08 21:26   ` Manfred Georg
2005-06-08 20:44 ` Chris Wright
2005-06-08 21:20   ` Alexander Nyberg
2005-06-08 21:33     ` Manfred Georg
2005-06-08 21:46       ` Alexander Nyberg
2005-06-08 21:54       ` Chris Wright
2005-06-08 21:59     ` Chris Wright
2005-06-08 23:49       ` Lee Revell
2005-06-09  2:59     ` David Wagner
2005-06-09 10:32       ` Alexander Nyberg [this message]
2005-06-09 14:55         ` David Wagner
2005-06-09 15:31           ` Lee Revell

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=1118313167.970.15.camel@localhost.localdomain \
    --to=alexn@telia.com \
    --cc=daw-usenet@taverner.cs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    /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