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]
Message-ID: <15805.1559074726@warthog.procyon.org.uk>
Date:   Tue, 28 May 2019 21:18:46 +0100
From:   David Howells <dhowells@...hat.com>
To:     Casey Schaufler <casey@...aufler-ca.com>
Cc:     dhowells@...hat.com, James Morris <jmorris@...ei.org>,
        Linux Security Module list 
        <linux-security-module@...r.kernel.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PULL] Smack: Restore the smackfsdef mount option

Casey Schaufler <casey@...aufler-ca.com> wrote:

> > 	 static const struct fs_parameter_spec smack_param_specs[] = {
> > 	+	fsparam_string("fsdef",		Opt_fsdefault),
> > 		fsparam_string("fsdefault",	Opt_fsdefault),
> > 		fsparam_string("fsfloor",	Opt_fsfloor),
> > 		fsparam_string("fshat",		Opt_fshat),
> >
> > but that all the option names in that table *do* need prefixing with
> > "smack".

Actually, you're right, we do need to add that *and* prefix it with "smack".

> I'm not sure I follow the logic, because "mount -o smackfsdefault=Pop"
> does what I would expect it to.

Yes, I'm sure it does - for the cases you're testing - but it's filesystem and
syscall dependent.  None of the filesystems currently ported to the mount API
upstream override ->parse_monolithic(), but that changes with nfs, shmem and
coda and will change with cifs too.

It also changes if you use fsconfig() to supply the options because that goes
through a different LSM hook (it uses fs_context_parse_param rather than
sb_eat_lsm_opts).

> > The way you enter the LSM is going to depend on whether
> > generic_parse_monolithic() is called.  You're only going to enter this way
> > if mount(2) is the syscall of entry and the filesystem doesn't override
> > the ->parse_monolithic() option (none in the upstream kernel).
> 
> So you're saying that the code works for the mount(2) case,
> but won't work for some other case? Are you planning a fix?
> Will that fix include restoration of smackfsdef?

I can do a fix, but testing it is a pain.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ