All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: James Bottomley
	<James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>,
	"Eric W. Biederman"
	<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Cc: mkayaalp-4hyTIkVWTs8LubxHQvXPfYdd74u8MsAO@public.gmane.org,
	Mehmet Kayaalp
	<mkayaalp-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	sunyuqiong1988-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	david.safford-JJi787mZWgc@public.gmane.org,
	linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-integrity-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	zohar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Subject: Re: [RFC PATCH v2 1/3] ima: extend clone() with IMA namespace support
Date: Fri, 16 Mar 2018 13:04:16 -0400	[thread overview]
Message-ID: <7e015d3c-4fab-3d69-711b-2ebbad07018f@linux.vnet.ibm.com> (raw)
In-Reply-To: <056e5b9e-b4d3-1862-baea-06dda4bd0713-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

On 03/15/2018 03:15 PM, Stefan Berger wrote:
> On 03/15/2018 03:01 PM, James Bottomley wrote:
>> On Thu, 2018-03-15 at 14:51 -0400, Stefan Berger wrote:
>>> On 03/15/2018 02:45 PM, James Bottomley wrote:
>> [...]
>>>>>> going to need some type of keyring namespace and there's
>>>>>> already
>>>>>> one hanging off the user_ns:
>>>>>>
>>>>>> commit f36f8c75ae2e7d4da34f4c908cebdb4aa42c977e
>>>>>> Author: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>>>>>> Date:   Tue Sep 24 10:35:19 2013 +0100
>>>>>>
>>>>>>        KEYS: Add per-user_namespace registers for persistent
>>>>>> per-UID
>>>>>> kerberos caches
>>>>> The benefit for IMA would be that this would then tie the keys
>>>>> needed for appraising to the IMA namespace's policy.
>>>>> However, if you have an appraise policy in your IMA namespace,
>>>>> which is now hooked to the user namespace, and you join that user
>>>>> namespace but your files don't have signatures, nothing will
>>>>> execute anymore. That's now a side effect of joining this user
>>>>> namespace unless we have a magic  exception. My feeling is,
>>>>> people may not like that...
>>>> Agree, but I think the magic might be to populate the ima keyring
>>>> with the parent on user_ns creation.  That way the user_ns owner
>>>> can delete the parent keys if they don't like them, but by default
>>>> the parent appraisal policy should just work.
>>> That may add keys to your keyring but doesn't get you signatures on
>>> your  files.
>> But it doesn't need to.  The only way we'd get a failure is if the file
>> is already being appraised and we lose access to the key.  If the
>
> Well, the configuration I talked about above was assuming that we have 
> an appraisal policy active in the IMA namespace, which is now tied to 
> the user namespace that was just joined.
>
> If we are fine with the side effects of an IMA policy active as part 
> of a user namespace then let's go with it. The side effects in case of 
> an active IMA appraisal may then be that files cannot be 
> read/accessed, or file measurements or IMA auditing may occur.
>
> The alternative is we have an independent IMA namespace. If one joins 
> the USER namespace and there are no IMA-related side effects. If one 
> joins the IMA namespace its IMA policy should start being enforced. If 
> the current active USER namespace has the keys that go with the 
> signatures of the filesystem, then we're fine from the appraisal 
> perspective. If not, then IMA namespace joining may prevent file 
> accesses.

With these differences pointed out, which path do we want to go now ? 
Eric ? James ?

    Stefan

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Cc: mkayaalp@cs.binghamton.edu,
	Mehmet Kayaalp <mkayaalp@linux.vnet.ibm.com>,
	sunyuqiong1988@gmail.com, containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, david.safford@ge.com,
	linux-security-module@vger.kernel.org,
	linux-integrity@vger.kernel.org, zohar@linux.vnet.ibm.com
Subject: Re: [RFC PATCH v2 1/3] ima: extend clone() with IMA namespace support
Date: Fri, 16 Mar 2018 13:04:16 -0400	[thread overview]
Message-ID: <7e015d3c-4fab-3d69-711b-2ebbad07018f@linux.vnet.ibm.com> (raw)
In-Reply-To: <056e5b9e-b4d3-1862-baea-06dda4bd0713@linux.vnet.ibm.com>

On 03/15/2018 03:15 PM, Stefan Berger wrote:
> On 03/15/2018 03:01 PM, James Bottomley wrote:
>> On Thu, 2018-03-15 at 14:51 -0400, Stefan Berger wrote:
>>> On 03/15/2018 02:45 PM, James Bottomley wrote:
>> [...]
>>>>>> going to need some type of keyring namespace and there's
>>>>>> already
>>>>>> one hanging off the user_ns:
>>>>>>
>>>>>> commit f36f8c75ae2e7d4da34f4c908cebdb4aa42c977e
>>>>>> Author: David Howells <dhowells@redhat.com>
>>>>>> Date:   Tue Sep 24 10:35:19 2013 +0100
>>>>>>
>>>>>>        KEYS: Add per-user_namespace registers for persistent
>>>>>> per-UID
>>>>>> kerberos caches
>>>>> The benefit for IMA would be that this would then tie the keys
>>>>> needed for appraising to the IMA namespace's policy.
>>>>> However, if you have an appraise policy in your IMA namespace,
>>>>> which is now hooked to the user namespace, and you join that user
>>>>> namespace but your files don't have signatures, nothing will
>>>>> execute anymore. That's now a side effect of joining this user
>>>>> namespace unless we have a magic  exception. My feeling is,
>>>>> people may not like that...
>>>> Agree, but I think the magic might be to populate the ima keyring
>>>> with the parent on user_ns creation.  That way the user_ns owner
>>>> can delete the parent keys if they don't like them, but by default
>>>> the parent appraisal policy should just work.
>>> That may add keys to your keyring but doesn't get you signatures on
>>> your  files.
>> But it doesn't need to.  The only way we'd get a failure is if the file
>> is already being appraised and we lose access to the key.  If the
>
> Well, the configuration I talked about above was assuming that we have 
> an appraisal policy active in the IMA namespace, which is now tied to 
> the user namespace that was just joined.
>
> If we are fine with the side effects of an IMA policy active as part 
> of a user namespace then let's go with it. The side effects in case of 
> an active IMA appraisal may then be that files cannot be 
> read/accessed, or file measurements or IMA auditing may occur.
>
> The alternative is we have an independent IMA namespace. If one joins 
> the USER namespace and there are no IMA-related side effects. If one 
> joins the IMA namespace its IMA policy should start being enforced. If 
> the current active USER namespace has the keys that go with the 
> signatures of the filesystem, then we're fine from the appraisal 
> perspective. If not, then IMA namespace joining may prevent file 
> accesses.

With these differences pointed out, which path do we want to go now ? 
Eric ? James ?

    Stefan

WARNING: multiple messages have this Message-ID (diff)
From: stefanb@linux.vnet.ibm.com (Stefan Berger)
To: linux-security-module@vger.kernel.org
Subject: [RFC PATCH v2 1/3] ima: extend clone() with IMA namespace support
Date: Fri, 16 Mar 2018 13:04:16 -0400	[thread overview]
Message-ID: <7e015d3c-4fab-3d69-711b-2ebbad07018f@linux.vnet.ibm.com> (raw)
In-Reply-To: <056e5b9e-b4d3-1862-baea-06dda4bd0713@linux.vnet.ibm.com>

On 03/15/2018 03:15 PM, Stefan Berger wrote:
> On 03/15/2018 03:01 PM, James Bottomley wrote:
>> On Thu, 2018-03-15 at 14:51 -0400, Stefan Berger wrote:
>>> On 03/15/2018 02:45 PM, James Bottomley wrote:
>> [...]
>>>>>> going to need some type of keyring namespace and there's
>>>>>> already
>>>>>> one hanging off the user_ns:
>>>>>>
>>>>>> commit f36f8c75ae2e7d4da34f4c908cebdb4aa42c977e
>>>>>> Author: David Howells <dhowells@redhat.com>
>>>>>> Date:   Tue Sep 24 10:35:19 2013 +0100
>>>>>>
>>>>>>        KEYS: Add per-user_namespace registers for persistent
>>>>>> per-UID
>>>>>> kerberos caches
>>>>> The benefit for IMA would be that this would then tie the keys
>>>>> needed for appraising to the IMA namespace's policy.
>>>>> However, if you have an appraise policy in your IMA namespace,
>>>>> which is now hooked to the user namespace, and you join that user
>>>>> namespace but your files don't have signatures, nothing will
>>>>> execute anymore. That's now a side effect of joining this user
>>>>> namespace unless we have a magic  exception. My feeling is,
>>>>> people may not like that...
>>>> Agree, but I think the magic might be to populate the ima keyring
>>>> with the parent on user_ns creation.  That way the user_ns owner
>>>> can delete the parent keys if they don't like them, but by default
>>>> the parent appraisal policy should just work.
>>> That may add keys to your keyring but doesn't get you signatures on
>>> your  files.
>> But it doesn't need to.  The only way we'd get a failure is if the file
>> is already being appraised and we lose access to the key.  If the
>
> Well, the configuration I talked about above was assuming that we have 
> an appraisal policy active in the IMA namespace, which is now tied to 
> the user namespace that was just joined.
>
> If we are fine with the side effects of an IMA policy active as part 
> of a user namespace then let's go with it. The side effects in case of 
> an active IMA appraisal may then be that files cannot be 
> read/accessed, or file measurements or IMA auditing may occur.
>
> The alternative is we have an independent IMA namespace. If one joins 
> the USER namespace and there are no IMA-related side effects. If one 
> joins the IMA namespace its IMA policy should start being enforced. If 
> the current active USER namespace has the keys that go with the 
> signatures of the filesystem, then we're fine from the appraisal 
> perspective. If not, then IMA namespace joining may prevent file 
> accesses.

With these differences pointed out, which path do we want to go now ? 
Eric ? James ?

    Stefan

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2018-03-16 17:04 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 20:14 [RFC PATCH v2 0/3] ima: namespacing IMA Stefan Berger
2018-03-09 20:14 ` Stefan Berger
2018-03-09 20:14 ` Stefan Berger
2018-03-09 20:14 ` [RFC PATCH v2 1/3] ima: extend clone() with IMA namespace support Stefan Berger
2018-03-09 20:14   ` Stefan Berger
     [not found]   ` <20180309201421.6150-2-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-15 10:40     ` Eric W. Biederman
2018-03-15 10:40       ` Eric W. Biederman
2018-03-15 10:40       ` Eric W. Biederman
     [not found]       ` <87vadxfwqj.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2018-03-15 15:26         ` Stefan Berger
2018-03-15 15:26           ` Stefan Berger
2018-03-15 15:26           ` Stefan Berger
     [not found]           ` <c18b6e92-57f0-5994-eb60-5fadc6671832-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-15 17:33             ` James Bottomley
2018-03-15 17:33               ` James Bottomley
2018-03-15 17:33               ` James Bottomley
2018-03-15 17:33               ` James Bottomley
     [not found]               ` <1521135192.5348.64.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2018-03-15 18:26                 ` Stefan Berger
2018-03-15 18:26                   ` Stefan Berger
2018-03-15 18:26                   ` Stefan Berger
2018-03-15 18:45                   ` James Bottomley
2018-03-15 18:45                     ` James Bottomley
2018-03-15 18:45                     ` James Bottomley
2018-03-15 18:51                     ` Stefan Berger
2018-03-15 18:51                       ` Stefan Berger
     [not found]                       ` <0dc5b856-8dc6-7b5a-eeac-febd19f6498c-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-15 19:01                         ` James Bottomley
2018-03-15 19:01                           ` James Bottomley
2018-03-15 19:01                           ` James Bottomley
2018-03-15 19:01                           ` James Bottomley
     [not found]                           ` <1521140467.5348.94.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2018-03-15 19:15                             ` Stefan Berger
2018-03-15 19:15                               ` Stefan Berger
2018-03-15 19:15                               ` Stefan Berger
2018-03-15 19:20                               ` Eric W. Biederman
2018-03-15 19:20                                 ` Eric W. Biederman
     [not found]                                 ` <87sh915eo0.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2018-03-15 19:49                                   ` Stefan Berger
2018-03-15 19:49                                     ` Stefan Berger
2018-03-15 19:49                                     ` Stefan Berger
2018-03-15 20:35                                     ` Eric W. Biederman
2018-03-15 20:35                                       ` Eric W. Biederman
     [not found]                                       ` <87d10513id.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2018-03-21 15:19                                         ` Mimi Zohar
2018-03-21 15:19                                           ` Mimi Zohar
2018-03-21 15:19                                           ` Mimi Zohar
2018-03-21 15:19                                           ` Mimi Zohar
     [not found]                                     ` <19ecc296-b584-4e1a-5369-30090fbc7880-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-15 20:35                                       ` Eric W. Biederman
     [not found]                               ` <056e5b9e-b4d3-1862-baea-06dda4bd0713-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-15 19:20                                 ` Eric W. Biederman
2018-03-16 17:04                                 ` Stefan Berger [this message]
2018-03-16 17:04                                   ` Stefan Berger
2018-03-16 17:04                                   ` Stefan Berger
2018-03-22 16:47                             ` Stefan Berger
2018-03-22 16:47                               ` Stefan Berger
2018-03-22 16:47                               ` Stefan Berger
     [not found]                     ` <1521139535.5348.89.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2018-03-15 18:51                       ` Stefan Berger
2018-03-09 20:14 ` [RFC PATCH v2 2/3] ima: Add ns_status for storing namespaced iint data Stefan Berger
2018-03-09 20:14   ` Stefan Berger
     [not found] ` <20180309201421.6150-1-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-09 20:14   ` [RFC PATCH v2 1/3] ima: extend clone() with IMA namespace support Stefan Berger
2018-03-09 20:14   ` [RFC PATCH v2 2/3] ima: Add ns_status for storing namespaced iint data Stefan Berger
2018-03-09 20:14   ` [RFC PATCH v2 3/3] ima: mamespace audit status flags Stefan Berger
2018-03-09 20:14 ` Stefan Berger
2018-03-09 20:14   ` Stefan Berger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e015d3c-4fab-3d69-711b-2ebbad07018f@linux.vnet.ibm.com \
    --to=stefanb-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=david.safford-JJi787mZWgc@public.gmane.org \
    --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
    --cc=linux-integrity-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mkayaalp-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=mkayaalp-4hyTIkVWTs8LubxHQvXPfYdd74u8MsAO@public.gmane.org \
    --cc=sunyuqiong1988-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=zohar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.