Received: by 10.213.65.68 with SMTP id h4csp140147imn; Thu, 15 Mar 2018 12:04:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELtLK1t7e1KAf0Skafg6RP/W4OIt6UjAbLAZhplwUY9hEXqgoL5uaEUaXaHo9LJaaxGD/jTL X-Received: by 2002:a17:902:2468:: with SMTP id m37-v6mr9064920plg.388.1521140652500; Thu, 15 Mar 2018 12:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521140652; cv=none; d=google.com; s=arc-20160816; b=dEI+cSzAJRsOB99apAxJxMMD/uBCiy343avja6Pw1/r1rTEmTHZxhXdamlB5m1GQWp fjxgj7GezVjuAggSs6J0RhZMh6fRnXmLvMlXeFJCR9jYM5eAkmPHE1UhhWqMBtJ3Zr14 dWj7MQylWgMHlxxMgn9mFPwxe6p8vxtQ60xlLNuPwCSGtTekP0oT/eoSDSiY3lh15I+u oh7euYdsQVWp30t0yj4FVvbqC2OAl1IwJYfFNz0zYEb5g5NBNMTenEFY4G3dysk1n7Go 9Nn8fAF/WB9jeeoRizfcWZ8cVpxCKWc9VmHPhFsnfVRapMlVZ+9NbeRh3Ju6NNF3ninE 6d0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature:arc-authentication-results; bh=7rrtvXjCM83c4PtIiiPTBgtEFJrJMQRRIuPRQlu30SM=; b=rqvv7XpfeehCRBa/MUHNQfhW7kUSMuVltEfsUQWf2OcRVn5nAHZi41oSOXswE9+Zc+ 6MkYUL24YMrUEArQojq0guhhbGm4+lSmC0ZswTNQx0DjocuIp956iBDOrb8O27eVQE9O 35x5p7/U17x7Baalns0XHB84dlQtQwxDh6Ir/KXgbb4Vl/wew/3v68cx/oyvYipV5v+e ALTXvA58JH+nOGvn5kLg4B8LcGsKPCuQeIn4EYjjL6iEsq2lrK+eQLyE+JYlRbw9xKe8 +0jbUqdVfreXjwqpxkXbOkYBeHSU7nmv29ru/jOcd9Lv1GUD91Yx/DzITT8n5zf/csLK BJvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=XZv90csz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3-v6si4467758plo.45.2018.03.15.12.03.43; Thu, 15 Mar 2018 12:04:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=XZv90csz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932606AbeCOTBX (ORCPT + 99 others); Thu, 15 Mar 2018 15:01:23 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:39876 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752571AbeCOTBJ (ORCPT ); Thu, 15 Mar 2018 15:01:09 -0400 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 1C7178EE139; Thu, 15 Mar 2018 12:01:09 -0700 (PDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j1YPGbosE0no; Thu, 15 Mar 2018 12:01:08 -0700 (PDT) Received: from [153.66.254.194] (unknown [50.35.65.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 728618EE0C7; Thu, 15 Mar 2018 12:01:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1521140468; bh=B0fB+AmyfDGgu0L4Eo7P15Eb6I2aK+lKapbCtfG1Rno=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=XZv90cszgfpduBf4ag2gAV/HWdWpv8nzdKYBSLfQluTQNn9mYHAv5/ns1YumM52fv 07DcJNPa6Q0czckg8dinGRKe36dH5yuLmqqFXWO3xwJJ0jbNY8Pfp/kkpYxZr1Kx+h uBSgVPkOTVFicHegfNrf1GrxK4GXFHxpUlRp5ONE= Message-ID: <1521140467.5348.94.camel@HansenPartnership.com> Subject: Re: [RFC PATCH v2 1/3] ima: extend clone() with IMA namespace support From: James Bottomley To: Stefan Berger , "Eric W. Biederman" Cc: mkayaalp@cs.binghamton.edu, Mehmet Kayaalp , 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 Date: Thu, 15 Mar 2018 12:01:07 -0700 In-Reply-To: <0dc5b856-8dc6-7b5a-eeac-febd19f6498c@linux.vnet.ibm.com> References: <20180309201421.6150-1-stefanb@linux.vnet.ibm.com> <20180309201421.6150-2-stefanb@linux.vnet.ibm.com> <87vadxfwqj.fsf@xmission.com> <1521135192.5348.64.camel@HansenPartnership.com> <2183a3b4-6270-d2e9-70ad-a7399eb1681c@linux.vnet.ibm.com> <1521139535.5348.89.camel@HansenPartnership.com> <0dc5b856-8dc6-7b5a-eeac-febd19f6498c@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > > 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 parent policy isn't appraisal, entering the IMA NS won't cause appraisal to be turned on unless the owner asks for it, in which case it's caveat emptor: As it works today, if as root I add a default appraisal policy to IMA without either a key or xattrs, I get an unusable system. James