On Sun, 6 Oct 2002, Bill maltby - LFS Related wrote:
> Obviously not a bash flaw - it does not have file-system notification
> capability. But the kernel *is* aware of these things. The problem is that
> it has allowed removal of a directory structure that invalidates the cwd
> of an active process. For mounts, there is a "use count" that prevents
> unmounting an "active" file system. This is with good reason.
>
> I have always considered the failure of the kernel to provide a similar
> protection for "active" directory paths to be a flaw either in design or
> implementation. The net effect of the above example is to invalidate the
> environment of a properly operating process. Although I have not invest-
> igated the potential, I think that it might also provide opportunity for a
> security breach.
Hardly.
> Every *IX I have worked on has had this weakness. One would think that
> after all these years, all implementations would have remedied this
> situation.
Or... one would think after all these years you'd realize there's nothing
particularly wrong with being able to do this. The current working
directory is at best, just an environmental variable. If you're actually
_using_ some of those inodes at the time they're delinked, they won't
immediately go away. Open an flock() like you're supposed to if you'd
like to keep files around--user error is not a bug.
--
Unsubscribe: send email to [email protected]
and put 'unsubscribe lfs-security' in the subject header of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.