Re: [security] Race condition in udev

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

 



Hi,

> > > > 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!?
> > > > 
> > > The rename() will fail.
> > 
> > Because?
> > 
> POSIX.

More specifically?

And anyhow, I thought we were talking about the Linux kernel?!

> > > > > 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?!
> > > > 
> > > Read the code and find out.  It works.
> > 
> > Guess how I found out that it can not work.
> > 
> I don't know, you haven't given any detail of any problems you've
> encountered.

I haven't "encountered any problems", nor have I claimed to have
"encountered any problems".

You stated that the codepath in udev-node.c for the case when a
device node does already exist was somehow there for the case
when udev races with devmapper. I noted that that codepath is not
of any use in such a case, and that your argument thus is invalid.

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