Re: FS: hardlinks on directories

Trond Myklebust
2003-08-05T15:44:56Z

>>>>> " " == Jesse Pollard <jesse@cats-chateau.net> writes:

> You do have to remember that any NFS export gives IMPLICIT
> access to the entire filesystem (it is the device number that
> is actually exported). If the attacker can generate
> device:inode number, then that file reference can be opened. I
> haven't read/seen anything yet that has said different.

Not entirely true. The default under Linux is to enable subtree
checks. This means that knfsd must establish that the file being
accessed lies within a subtree the head of which is the export point.
This wreaks havoc with cross-directory renames etc, so a lot of people
disable it, however it is a slightly safer default...

Of course if you start playing with the idea of hard linked
directories then subtree checks are no longer an option as the path
connecting an export point and the file is no longer guaranteed to be
unique (and some paths may not even be finite).

Cheers,
Trond