lkml.org 
[lkml]   [1999]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: fsync on large files


    On Thu, 18 Feb 1999, David Luyer wrote:
    >
    > If Linux ever supports hardlinked directories, I really hope there's some way
    > to prevent them. That's one of the reasons for the .. sanity check I thought.
    >
    > Now:
    > * attacker discovers a directory temporarily open (bad permissions)
    > * attacker hardlinks to some of the files in there
    > * the security checker notices the link count increase

    Sure.

    > The future:
    > * attacker discovers a directory temporarily open (bad permissions)
    > * attacker hardlinks to a subdirectory in it
    > * you need yet another security check to check the link count on directories
    > matches the number of real files in it, and the check has to watch for
    > modifications as it is checking, etc, etc

    Not really.

    The future:
    * you need another security check that checks that the link count on the
    directory is 1.

    If you don't have a ".." entry, the link count for directories is always
    1, except if you have hard links - exactly the way it works for normal
    files.

    Note that there are many unix tools that know about the directory link
    counts, but they also know about ignoring it too - because there are
    already many filesystems that do not have the standard unix link count
    behaviour.

    Linus


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

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