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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 12 Dec 2019 18:13:55 +0100
From:   Ilya Dryomov <idryomov@...il.com>
To:     Laura Abbott <labbott@...hat.com>
Cc:     Al Viro <viro@...iv.linux.org.uk>,
        David Howells <dhowells@...hat.com>,
        Jeremi Piotrowski <jeremi.piotrowski@...il.com>,
        Linux FS Devel <linux-fsdevel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Phillip Lougher <phillip@...ashfs.org.uk>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] vfs: Don't reject unknown parameters

On Thu, Dec 12, 2019 at 3:51 PM Laura Abbott <labbott@...hat.com> wrote:
>
> The new mount API currently rejects unknown parameters if the
> filesystem doesn't have doesn't take any arguments. This is
> unfortunately a regression from the old API which silently
> ignores extra arguments. This is easly seen with the squashfs
> conversion (5a2be1288b51 ("vfs: Convert squashfs to use the new
> mount API")) which now fails to mount with extra options. Just
> get rid of the error.
>
> Fixes: 3e1aeb00e6d1 ("vfs: Implement a filesystem superblock
> creation/configuration context")
> Link: https://lore.kernel.org/lkml/20191130181548.GA28459@gentoo-tp.home/
> Reported-by: Jeremi Piotrowski <jeremi.piotrowski@...il.com>
> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1781863
> Signed-off-by: Laura Abbott <labbott@...hat.com>
> ---
>  fs/fs_context.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/fs_context.c b/fs/fs_context.c
> index 138b5b4d621d..7ec20b1f8a53 100644
> --- a/fs/fs_context.c
> +++ b/fs/fs_context.c
> @@ -160,8 +160,7 @@ int vfs_parse_fs_param(struct fs_context *fc, struct fs_parameter *param)
>                 return 0;
>         }
>
> -       return invalf(fc, "%s: Unknown parameter '%s'",
> -                     fc->fs_type->name, param->key);
> +       return 0;
>  }
>  EXPORT_SYMBOL(vfs_parse_fs_param);

Hi Laura,

I'm pretty sure this is a regression for all other filesystems
that used to check for unknown tokens and return an error from their
->mount/fill_super/etc methods before the conversion.

All filesystems that provide ->parse_param expect that ENOPARAM is
turned into an error with an error message.  I think we are going to
need something a bit more involved in vfs_parse_fs_param(), or just
a dummy ->parse_param for squashfs that would always return 0.

Thanks,

                Ilya

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ