Re: [security] Race condition in udev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> >> The device node is owned by root, what's the problem here?
> >
> > at least after the (first) chown() it potentially isn't owned by root, so
> > your statement in that form is false.
> 
> The mknod() already happens with the configured mode, so after the
> chown() we already have the configured permissions/ownership set.

well, (a) there is this does-already-exist-so-let's-preserve-it
part, in which case no mknod() does happen and (b) yeah, that was
pretty much my point: The mknod() already happens with the configured
mode(!), but AFAICS _not_ with the configured owner/group(!?). As
the config to my understanding is not supposed to say "make this
read-only to _some_ group", but rather "make this read-only to
group x", it's incorrect to apply the permissions intended for
group x to some other group, just because it happens to be a group,
too. The same applies for the chmod() part in the "preserve"-codepath.

And yeah, after the chown(), everything should be fine (given that
nobody has created a filehandle up to that point that wouldn't be
allowed anymore after that point), which is why the subject of my
mail reads "race condition" ;-)

Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux