Re: silent semantic changes with reiser4

From: Jamie Lokier
Date: Thu Aug 26 2004 - 08:52:11 EST


Christoph Hellwig wrote:
> you need to fstat after open to really check that no one swtiched the
> path below you to a fifo or device, O_DIRECTORY gets that directly in
> the open call, with the additional benefit of making sure you don't
> get any of the sideeffects at all that would happen if you're opening
> a device file.
>
> the current reiser4 semantics break that and as soon as you're having a
> world-writeable (e.g. /tmp) dir on it and someone is doing an opendir
> on it he's lost.

How does the current reiser4 semantics break that?

In a reiser4 filesystem, a file _is_ a directory.
opendir() is supposed to succeed on it.

There's bound to be some security issue, but I'm not sure what you're
getting at with /tmp. What sort of sort of security problem arises
with a world-writeable directory such as /tmp, that cannot arise with
the standard fs semantics?

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/