Re: bug: mount on an open directory succeeds

From: Amit S. Kale (akale@veritas.com)
Date: Tue Mar 07 2000 - 04:54:34 EST


> > So, . must point at the mounted filesystem as well, precisely as we
> > already do today. But then the best way to get rid of the fact that
> > foo and ./foo may differ is to do like Unix6 did and return EBUSY if
> > the mount point is the cwd of some process.
>
> Hmm, this can create a subtle DoS attack for user-accessible mount:
>
> Bad guy Good guy
> cd /home/goodguy/floppy
> # sits there with an evil mount ~/floppy -> EBUSY
> smile and waits fuser -k ~/floppy -> EPERM (*)
> Mail -s "heeeelllp" root
> ...
>
> * or doesn't see the processes in the first place, depending on
>/proc permissions)

This can be taken care of by removing access permissions on mount point.

Besides the 'bad guy' can cd AFTER mount and prevent the
'good guy' from unmounting.

-- 
Amit Kale
Veritas Software ( http://www.veritas.com )

- 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/



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:22 EST