lkml.org 
[lkml]   [2004]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: silent semantic changes with reiser4
    On Thu, Aug 26, 2004 at 06:13:03PM +0200, Christoph Hellwig wrote:
    > On Thu, Aug 26, 2004 at 05:06:38PM +0100, Jamie Lokier wrote:
    > > Christoph Hellwig wrote:
    > > > > 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?
    > > >
    > > > Actually you are right on that issue because it would open the
    > > > device/fifo as directory and not device/fifo (in fact I'd had to look at
    > > > the code again to see whether they actually do this only for files or
    > > > also for special files)
    > >
    > > Are you saying that with reiser4, you can open a device or fifo with
    > > O_DIRECTORY?
    >
    > That's what I thought, but as far as I can follow the code this is not
    > actually true.

    All reiser4 inodes have i_ops->lookup != NULL, so open(..., O_DIRECTORY) would
    succeed on them (thanks Nikita for reminding me that).

    It may be better to pass the control of that to ->i_op->permission() through
    explicit MAY_LOOKUP flag. It can be possible to eliminate the race by some
    more complex logic (strict ownership check, for example) in ->permission().

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

    \
     
     \ /
      Last update: 2005-03-22 14:05    [W:4.188 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site