Re: [security] Race condition in udev

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

 



Hi,

> > > reading some of the source of udev, I noticed what I would suspect to be a
> > [...]
> > 
> > could someone possibly explain to me why there is that special codepath
> > for cases where the device node does already exist, so I can write a
> > patch that's not gonna break other functionality?
> > 
> For example, when using devtmpfs; in which case the device nodes already
> exist.
> 
> Or when updating devices like /dev/null which are created before udevd
> is started by the init script when not using devtmpfs.

well, in those two cases always rename()ing the new node into place would
work, too!? That would be a different strategy than what's in
place at the moment, but it wouldn't need a special case!?

> Or when racing with devmapper which creates /dev/mapper/foo devices at
> basically the same time as udev.

Seriously? How is a piece of code that does the existence check and
the subsequent action depending on the result of that check non-atomically
supposed to help avoid some race condition resulting from possible
concurrent creation of a device node?!

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