lkml.org 
[lkml]   [2000]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: bug: mount on an open directory succeeds
    Date
    Amit S. Kale wrote:
    > This can be taken care of by removing access permissions on mount point.

    Sure. I just wonder what great benefit that "vertical behaviour" of
    "." should add that it justifies the addition of
    - a scan for processes with cwd on the mount point
    - a new requirement for prevention of a DoS attack
    while it
    - may break existing valid uses (i.e. disallowing mounting on a
    busy directory)
    - doesn't solve the problem for anything living further down the
    tree
    - may open new chroot exploits (by not solving ... see above)

    (All this under the assumption that the "foo" vs "./foo" inconsistency
    is resolved by making mount(2) fail if the mount point is busy.)

    What I see here is consistent "traditional" behaviour (i.e. "." non-
    vertical), and a gratuitous change in semantics that needs a lot of
    band aid to fix all the subtle distortions it creates.

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

    Yes, but note that before mount the permissions of the mount point apply,
    whole after mount, the permissions of the top-level directory of the
    mounted file system apply. Subtle, but has been like that on Linux for
    ages.

    So, what makes an implementation with "vertical ." superior to the
    traditional implementation with less complicated semantics ?

    - Werner

    --
    _________________________________________________________________________
    / Werner Almesberger, ICA, EPFL, CH werner.almesberger@ica.epfl.ch /
    /_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/

    -
    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:56    [W:2.467 / U:0.772 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site