linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott James Remnant <scott@canonical.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: [security] Race condition in udev
Date: Wed, 26 Aug 2009 11:22:14 +0000	[thread overview]
Message-ID: <1251285734.4175.169.camel@quest> (raw)
In-Reply-To: <20090821102407.GA29609@florz.florz.dyndns.org>

[-- Attachment #1: Type: text/plain, Size: 1735 bytes --]

On Tue, 2009-08-25 at 23:55 +0200, Florian Zumbiehl wrote:

> isn't that a bit at odds with the fact that the kernel does _not_ check
> against the accumulation of all of owner, group and others permissions
> that would apply to the process in question? Wouldn't really be all that
> difficult to implement, after all.
> 
The kernel doesn't check that the netmask of a network route is of the
form <1>s<0>s and not something random like 10101010... yet if you try
and use that kind of network route, you'll discover that it just won't
work out.

> Well, IMO you are mixing up what the userspace conventions of most
> desktop/server installations look like, and what the security model
> of the kernel is.
> 
> Given that udev is nearly a component of the kernel, IMO it should
> follow the security model of the kernel, and not force userspace to
> follow any additional conventions.
> 
udev doesn't enforce any permission or mode restriction; you can put
whatever you like in there.

Of course, it probably won't work out.


More to the point, you haven't explained how to work around the fact
that simply inverting the chmod/chown (or any variation of that) doesn't
remove the race condition - just moves it between the user or group.

> You didn't really answer a question the answer to which probably would be
> rather important in this context: Is there any way for a non-privileged
> process to drop a group membership without exec()ing?
> 
> Also, I really would like to understand why the rename() in that scenario
> could fail, independent of whether we'll use that for anything.
> 
Apparently I'm "Mr GOOGLE" as well as "Mr POSIX"

Scott
-- 
Scott James Remnant
scott@canonical.com

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  parent reply	other threads:[~2009-08-26 11:22 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-21 10:24 [security] Race condition in udev Florian Zumbiehl
2009-08-21 11:14 ` Kay Sievers
2009-08-21 11:25 ` Florian Zumbiehl
2009-08-21 11:59 ` Kay Sievers
2009-08-22  0:19 ` Florian Zumbiehl
2009-08-22  2:25 ` Bryan Kadzban
2009-08-22  3:11 ` Florian Zumbiehl
2009-08-25 11:32 ` Florian Zumbiehl
2009-08-25 11:58 ` Scott James Remnant
2009-08-25 12:03 ` Kay Sievers
2009-08-25 12:21 ` Florian Zumbiehl
2009-08-25 12:43 ` Scott James Remnant
2009-08-25 12:55 ` Florian Zumbiehl
2009-08-25 13:11 ` Florian Zumbiehl
2009-08-25 13:31 ` Scott James Remnant
2009-08-25 14:22 ` Florian Zumbiehl
2009-08-25 16:08 ` Scott James Remnant
2009-08-25 16:27 ` Florian Zumbiehl
2009-08-25 16:49 ` Scott James Remnant
2009-08-25 17:31 ` Florian Zumbiehl
2009-08-25 17:42 ` Greg KH
2009-08-25 18:04 ` Robby Workman
2009-08-25 18:05 ` Scott James Remnant
2009-08-25 18:11 ` Florian Zumbiehl
2009-08-25 18:17 ` Kay Sievers
2009-08-25 18:20 ` Greg KH
2009-08-25 18:21 ` Greg KH
2009-08-25 18:38 ` Florian Zumbiehl
2009-08-25 18:53 ` Florian Zumbiehl
2009-08-25 19:10 ` Greg KH
2009-08-25 19:28 ` Mr POSIX
2009-08-25 21:55 ` Florian Zumbiehl
2009-08-26 11:22 ` Scott James Remnant [this message]
2009-08-26 17:41 ` Florian Zumbiehl
2009-08-26 21:00 ` Greg KH
2009-08-27  6:54 ` Matthias Schwarzott
2009-08-27 15:09 ` Florian Zumbiehl
2009-08-27 15:13 ` Florian Zumbiehl
2009-08-27 15:22 ` Greg KH
2009-08-27 15:52 ` Florian Zumbiehl
2009-08-27 16:03 ` Florian Zumbiehl
2009-08-28 17:34 ` Florian Zumbiehl
2009-08-29 14:15 ` Kay Sievers
2009-08-29 14:20 ` Florian Zumbiehl
2009-08-29 14:32 ` Kay Sievers
2009-08-29 14:41 ` Florian Zumbiehl
2009-08-29 14:47 ` Kay Sievers
2009-08-29 14:58 ` Florian Zumbiehl
2009-09-04 19:12 ` Florian Zumbiehl
2009-09-04 19:16 ` Florian Zumbiehl

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=1251285734.4175.169.camel@quest \
    --to=scott@canonical.com \
    --cc=linux-hotplug@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;
as well as URLs for NNTP newsgroup(s).