Re: [security] Race condition in udev

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

 



Florian Zumbiehl wrote:
> 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(!?).

No, it happens with owner/group root, since that's who udev runs as
(unless I'm missing something).  Do you not trust that owner/group for
some reason?  :-)

If you still don't trust root/root, how would you suggest fixing it,
given that there is no system call to set owner, group, and mode all at
once?  If the chown() / chmod() calls are reversed, then you have the
same problem in the other direction...

Attachment: signature.asc
Description: OpenPGP digital signature


[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