lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 12 Aug 2020 13:53:12 -0600
From:   Ross Zwisler <zwisler@...omium.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Alexander Viro <viro@...iv.linux.org.uk>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Mattias Nissler <mnissler@...omium.org>,
        Aleksa Sarai <cyphar@...har.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Benjamin Gordon <bmgordon@...gle.com>,
        David Howells <dhowells@...hat.com>,
        Dmitry Torokhov <dtor@...gle.com>,
        Jesse Barnes <jsbarnes@...gle.com>,
        linux-fsdevel@...r.kernel.org, Micah Morton <mortonm@...gle.com>,
        Raul Rangel <rrangel@...gle.com>
Subject: Re: [PATCH v7] Add a "nosymfollow" mount option.

On Wed, Aug 12, 2020 at 12:36 PM Matthew Wilcox <willy@...radead.org> wrote:
> On Tue, Aug 11, 2020 at 04:28:03PM -0600, Ross Zwisler wrote:
> > diff --git a/include/uapi/linux/mount.h b/include/uapi/linux/mount.h
> > index 96a0240f23fed..dd8306ea336c1 100644
> > --- a/include/uapi/linux/mount.h
> > +++ b/include/uapi/linux/mount.h
> > @@ -16,6 +16,7 @@
> >  #define MS_REMOUNT   32      /* Alter flags of a mounted FS */
> >  #define MS_MANDLOCK  64      /* Allow mandatory locks on an FS */
> >  #define MS_DIRSYNC   128     /* Directory modifications are synchronous */
> > +#define MS_NOSYMFOLLOW       256     /* Do not follow symlinks */
> >  #define MS_NOATIME   1024    /* Do not update access times. */
> >  #define MS_NODIRATIME        2048    /* Do not update directory access times */
> >  #define MS_BIND              4096
>
> Does this need to be added to MS_RMT_MASK too?

I don't think so, because IIUC that is only for "superblock flags",
i.e. flags which are part of the sb_flags definition in
do_mount()/path_mount()?

https://github.com/torvalds/linux/blob/master/fs/namespace.c#L3172

With the current code I'm able to remount and flip nosymfollow both
directions without issue.  Similarly, MS_NOEXEC can be turned on and
off at will, and it's not part of MS_RMT_MASK nor sb_flags.

Interestingly, though, if you change MS_RMT_MASK to be 0, I would
expect us to be unable to twiddle all the flags which are currently
part of it, but that isn't the case.   I was still able to change
between RO/RW, and turn on lazytime.

So, I think this flag is working as expected, but that there is
probably a bug in there somewhere WRT the handling of MS_RMT_MASK.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ