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: <8895cb9c-7b9e-2f82-e3d8-a15f5fc26e25@canonical.com>
Date:   Wed, 18 Apr 2018 14:32:59 -0700
From:   John Johansen <john.johansen@...onical.com>
To:     "Eric W. Biederman" <ebiederm@...ssion.com>,
        Mimi Zohar <zohar@...ux.vnet.ibm.com>
Cc:     Stefan Berger <stefanb@...ux.vnet.ibm.com>,
        linux-integrity@...r.kernel.org,
        containers@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org,
        linux-security-module@...r.kernel.org, tycho@...ker.com,
        serge@...lyn.com, sunyuqiong1988@...il.com, david.safford@...com,
        mkayaalp@...binghamton.edu, James.Bottomley@...senPartnership.com,
        Yuqiong Sun <suny@...ibm.com>,
        Mehmet Kayaalp <mkayaalp@...ux.vnet.ibm.com>
Subject: Re: [RFC PATCH v3 1/3] ima: extend clone() with IMA namespace support

On 04/18/2018 01:12 PM, Eric W. Biederman wrote:
> Mimi Zohar <zohar@...ux.vnet.ibm.com> writes:
> 
>> On Wed, 2018-04-18 at 09:09 -0700, John Johansen wrote:
>>> On 04/13/2018 09:25 AM, Mimi Zohar wrote:
>>>> [Cc'ing John Johansen]
>>>>
>>>> On Tue, 2018-03-27 at 18:01 -0500, Eric W. Biederman wrote:
>>>> [...]
>>>>> As such I expect the best way to create the ima namespace is by simply
>>>>> writing to securityfs/imafs.  Possibly before the user namespace is
>>>>> even unshared.  That would allow IMA to keep track of things from
>>>>> before a container is created.
>>>>
>>>
>>> I do think this is generally the right approach for LSMs when looking
>>> forward to LSM stacking and more LSMs.
>>>
>>>
>>>> My initial thought was to stage IMA namespacing with just IMA-audit
>>>> first, followed by either IMA-measurement or IMA-appraisal.  This
>>>> would allow us to get the basic IMA namespacing framework working and
>>>> defer dealing with the securityfs related namespacing of the IMA
>>>> policy and measurement list issues to later.
>>>>
>>>> By tying IMA namespacing to a securityfs ima/unshare file, we would
>>>> need to address the securityfs issues first.
>>>>
>>>
>>> well it depends on what you want to do. It would be possible to have
>>> a simple file (not a jump link) within securityfs that IMA could use
>>> without having to deal with all the securityfs issues first. However it
>>> does require that securityfs (not necessarily imafs) be visible within
>>> the mount namespace of the task doing the setup.
>>
>> Eric, would you be OK with that?
> 
> Roughly.  My understanding is that you have to have a write to some
> filesystem to set the ima policy.
> 
> I was expecting having to write an "create ima namespace" value
> to the filesystem would not be any special effort.
> 
> Now it sounds like providing the "create an ima namespace" is going to
> be a special case, and that does not sound correct.
> 
not necessarily special case, but they do need to settle on an interface
that will work for them, and will work with the order they want to land
things. I was just trying to point out that there are fs solutions that
can work without having deal with the full securityfs/imafs namespacing
solution landing first.

While create a file directly in securityfs that lives along side the imafs
dir.
ima_create_ns
ima/
does feel like a special case. It could work

what I was thinking of when I proposed a simple is to do it within the ima
dir, say
ima/create_ns

For now its just a single file but once imafs becomes "virtualized" to a
namespace view, each dir that imafs jumplinks to contains a instance of the
file.


Or they could avoid securityfs/imafs entirely and leverage a file in
procfs

/proc/<pid>/attr/{current,exec,...}

currently those are claimed by the LSMs but new file could be added or
perhaps even better we could lift the some code from the LSM stacking work
to provide an ima specific dir

  /proc/<pid>/attr/ima/{current,exec,...}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ