Re: [nfsv4] New Version Notification for draft-cel-nfsv4-linux-seclabel-xtensions-00.txt

"Quigley, David" <david.quigley@intel.com> Thu, 03 May 2018 21:58 UTC

Return-Path: <david.quigley@intel.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C508D1267BB for <nfsv4@ietfa.amsl.com>; Thu, 3 May 2018 14:58:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.9
X-Spam-Level:
X-Spam-Status: No, score=-6.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U6YWLZMv69Tc for <nfsv4@ietfa.amsl.com>; Thu, 3 May 2018 14:58:32 -0700 (PDT)
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C4D8D12EAFC for <nfsv4@ietf.org>; Thu, 3 May 2018 14:58:32 -0700 (PDT)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 May 2018 14:58:32 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.49,360,1520924400"; d="scan'208";a="37284813"
Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by fmsmga008.fm.intel.com with ESMTP; 03 May 2018 14:58:32 -0700
Received: from orsmsx159.amr.corp.intel.com (10.22.240.24) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 3 May 2018 14:58:31 -0700
Received: from orsmsx108.amr.corp.intel.com ([169.254.2.198]) by ORSMSX159.amr.corp.intel.com ([169.254.11.191]) with mapi id 14.03.0319.002; Thu, 3 May 2018 14:58:31 -0700
From: "Quigley, David" <david.quigley@intel.com>
To: Bruce Fields <bfields@fieldses.org>, Tom Haynes <loghyr@gmail.com>
CC: Chuck Lever <chuck.lever@oracle.com>, Spencer Shepler <spencer.shepler@gmail.com>, NFSv4 <nfsv4@ietf.org>
Thread-Topic: [nfsv4] New Version Notification for draft-cel-nfsv4-linux-seclabel-xtensions-00.txt
Thread-Index: AQHT4lzNFhC2/z/1zUWHvcu/aQ8KtaQdBMHwgAGOdgCAAAUKAIAABE+A///vrlA=
Date: Thu, 03 May 2018 21:58:30 +0000
Message-ID: <106AF901BBB25B4082BCE4FEC2F79D440627D0B1@ORSMSX108.amr.corp.intel.com>
References: <152337099624.13448.11040477333954216664.idtracker@ietfa.amsl.com> <FB6B8D57-CEF6-46E1-97C7-E43C7E49752F@oracle.com> <2CBB38A6-45FF-46A4-96A5-5D1B431E1365@gmail.com> <106AF901BBB25B4082BCE4FEC2F79D440627CED6@ORSMSX108.amr.corp.intel.com> <20180503151332.GC14163@fieldses.org> <C15E3AF6-806C-468F-B3F8-ACF9EF26BA15@gmail.com> <20180503154659.GD14163@fieldses.org>
In-Reply-To: <20180503154659.GD14163@fieldses.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
dlp-product: dlpe-windows
dlp-version: 11.0.200.100
dlp-reaction: no-action
x-originating-ip: [10.22.254.138]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/sykYKSwaakZvq4zcpyCEE3_tWI0>
Subject: Re: [nfsv4] New Version Notification for draft-cel-nfsv4-linux-seclabel-xtensions-00.txt
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 03 May 2018 21:58:35 -0000

The issue is the only one defined at the moment in the LFS registry is the flask one. Casey doesn't have a number assigned for a SMACK label format so I believe that is why we have 0 used. When Jarret and I wrote the LFS document I believe the intent of id 0 was that this was a null identifier which was to be taken as no format specified. Essentially it would just be raw data. This seems to not have been codified in the actual document and it is not clear why that is the case. In my initial implementation before someone else took over I had a daemon similar to the old idmapd called doimapd which filled in the LFS field properly. Ideally when the kernel goes to package up the attribute it would see what LSM it is using and that LSM would provide it with a valid LFS structure for the attribute. On the other end it would understand the LFS structure and be able to unpack it.

>From an implementation standpoint I don't think this is an issue because what it means currently is the MAC on both the client and server have to match. In the future this could be changed so an intermediate daemon handles the label and policy translation. Ideally an SELinux enabled server could receive a request from a Trusted Solaris (I think its trusted extensions now) and be able to retain the MLS portion of the label and just assign an arbitrary SELinux label. This wasn't implemented or attempted as Linux is the only Labeled NFS implementation at the moment but that was the intent.

Dave

-----Original Message-----
From: Bruce Fields [mailto:bfields@fieldses.org] 
Sent: Thursday, May 3, 2018 9:47 AM
To: Tom Haynes <loghyr@gmail.com>
Cc: Quigley, David <david.quigley@intel.com>; Chuck Lever <chuck.lever@oracle.com>; Spencer Shepler <spencer.shepler@gmail.com>; NFSv4 <nfsv4@ietf.org>
Subject: Re: [nfsv4] New Version Notification for draft-cel-nfsv4-linux-seclabel-xtensions-00.txt

On Thu, May 03, 2018 at 08:31:34AM -0700, Tom Haynes wrote:
> 
> 
> > On May 3, 2018, at 8:13 AM, J. Bruce Fields <bfields@fieldses.org> wrote:
> > 
> > On Wed, May 02, 2018 at 10:36:34PM +0000, Quigley, David wrote:
> >> Also having them as 3 different LFS ids make no sense. The LFS is 
> >> supposed to describe the format of what you are sending and 
> >> receiving for the sec_label field.
> > 
> > By the way, something Chuck noticed is that the Linux client and 
> > server implementations are completely ignoring the LFS field--they 
> > always discard it when receiving, and set it to 0 when sending.  I 
> > assume we should at least fix them to reject non-zero values for now.
> > 
> > --b.
> 
> Actually, that is a bug in the Linux implementation!
> 
> According to RFC7569, a LFS of 0 is reserved.

If there's something else we should be using, we could modify them to send that and reject anything that's not that or zero.

We're stuck with the zero now, though, alas.

--b.