Re: [nfsv4] Linux IMA on NFS follow-up

Chuck Lever <chuck.lever@oracle.com> Wed, 29 August 2018 15:18 UTC

Return-Path: <chuck.lever@oracle.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 00BA2130E8F for <nfsv4@ietfa.amsl.com>; Wed, 29 Aug 2018 08:18:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.31
X-Spam-Level:
X-Spam-Status: No, score=-4.31 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=oracle.com
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 5nXBghRtLr8u for <nfsv4@ietfa.amsl.com>; Wed, 29 Aug 2018 08:18:11 -0700 (PDT)
Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 B04A7130DF6 for <nfsv4@ietf.org>; Wed, 29 Aug 2018 08:18:11 -0700 (PDT)
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w7TF8tkX032795; Wed, 29 Aug 2018 15:18:10 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2018-07-02; bh=3BV99zeQGuORYuqmpgjvgVniI8ZfpNxbiXrpYEHQSng=; b=Hw3Mhck/AqnlxrpPspEfcrAprh6BLQWigzlW/Rn3ZKRbh28k1h6BytdnxBOUrCsrvOlD F9qU18VYtadpbn7SSohk7DxOa66FDNDxX6fIRWzSMIihgVNEWIHP1aIgeTvhBNf0wjQp EmMKAfWlBBcpK46LaYKa7RUJt9rEI9H8xmS4Ith9Gk92RVN/ax4oRiN5hyPfw/iTdPHz 3h9yRqStnxmravLrvEYSugUp+efe8OtiiNbvVu3gscK1qAfpSM3ElwY8yjqhFDATbUkh k5VLmL04upz5AfWkhLxulINWMeSu5sq1t1O98DLGOPraIYwWdoIHHKrvxkA6azzHwrii zg==
Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2m2xhttg0e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 Aug 2018 15:18:10 +0000
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w7TFI9Qm000443 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 Aug 2018 15:18:10 GMT
Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w7TFI9bJ008751; Wed, 29 Aug 2018 15:18:09 GMT
Received: from anon-dhcp-171.1015granger.net (/68.61.232.219) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 29 Aug 2018 08:18:09 -0700
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Chuck Lever <chuck.lever@oracle.com>
In-Reply-To: <3f340381-9361-dcec-07b8-8a9e137b49c5@talpey.com>
Date: Wed, 29 Aug 2018 11:18:07 -0400
Cc: nfsv4@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <48D185DB-1470-4F7E-AFA0-DF42964CDC81@oracle.com>
References: <C3D8FCD5-D792-43DA-BF4C-A56053AD85D3@oracle.com> <CAKKJt-dn1WbxYOx-CeWyGpWrpHxtVqLpFxroVj5LC4w9E8HZkw@mail.gmail.com> <ED4BDE8F-6AD4-4F96-A300-136C0BF2C43E@oracle.com> <BL0PR2101MB099349DA26CAEFACA5CD3C66A00A0@BL0PR2101MB0993.namprd21.prod.outlook.com> <501EFD14-0E07-42A3-87E5-C223FB110718@oracle.com> <3f340381-9361-dcec-07b8-8a9e137b49c5@talpey.com>
To: Tom Talpey <tom@talpey.com>
X-Mailer: Apple Mail (2.3445.9.1)
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9000 signatures=668708
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=8 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808290161
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/NpO3fEvxYqvgsdzZXHQOyI1L-dA>
Subject: Re: [nfsv4] Linux IMA on NFS follow-up
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.27
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: Wed, 29 Aug 2018 15:18:14 -0000


> On Aug 29, 2018, at 7:48 AM, Tom Talpey <tom@talpey.com> wrote:
> 
> On 8/28/2018 7:22 PM, Chuck Lever wrote:
>> Hi Tom-
>>> On Aug 28, 2018, at 4:42 PM, Tom Talpey <ttalpey@microsoft.com> wrote:
>>> 
>>>> The issue of interoperation is IMA's problem: they need to
>>>> be able to add/remove features while remaining compatible
>>>> with what's already in on-disk filesystems, as their vision
>>>> of IMA evolves. IOW they already have to solve this problem
>>>> with local filesystems.
>>> 
>>> Is your intention to limit the discussion to IMA? What about filesystems
>>> which support native integrity, such as ReFS, ZFS, etc?
>> I think it is limited to integrity measurement. It is
>> different than "native integrity", where the data is
>> protected only while it's at rest on the NFS server.
>> Native integrity metadata is generated on the fly by
>> the filesystem itself.
>> Native integrity also would not seem to be suitable for
>> protecting the data while in transit. NFS has a separate
>> mechanism for that too.
> 
> Ok, thanks for the clarification. Obviously, I haven't read the
> draft.

It was a good question! And I'm happy to repeat some of the
draft and PowerPoint here for folks who missed Montreal.


> NFS has protection for its messages, at least if krb5i is used,
> but that's a hop-by-hop protection and quite different. Not at
> issue, here, got it.

As David pointed out, perhaps different terminology would
help distinguish the purpose of this new mechanism from
typical at-rest integrity (a la ZFS) and in-transit integrity
(a la krb5i). I'll use the term "measurement metadata" for
the moment.


>> IMA provides provenance: the content hash is signed by a
>> software provider. The signature plus the content hash
>> guarantee that the content hasn't been altered since the
>> file was written by the software provider. It ensures
>> integrity from the "factory" all the way to the
>> execution environment of the end user.
>> So this is a piece of long-lived security metadata that
>> is generated independently of users or local storage
>> devices.
> 
> Ok, that's clear, but it requires the upper layer to provide the
> information. So NFS becomes basically a transport for the hash.
> What upper layers are actually using such an interface?

Let's consider an example of how IMA works today.

A software vendor wants to provide its own version of the
"ping" program. To avoid malicious tampering, it computes an
HMAC hash of the executable file, and signs the hash. That
signed hash accompanies the executable file to the vendor's
customers. This is the measurement metadata.

When a customer installs "ping" on a filesystem that supports
IMA, the measurement metadata is saved as an extended attri-
bute of the file storing the "ping" executable, similar to
any security label.

Before executing "ping", the customer's operating system
pulls the "ping" executable into its page cache. The IMA
module reads the measurement metadata. It verifies the signa-
ture against the software vendor's public certificate. It
verifies the hash by recomputing the HMAC on the copy of
"ping" in the page cache.

If all checks out, "ping" is allowed to execute normally. If
not, the operating system prevents execution.

Measurement metadata is typically provided by someone else,
not by local agents. And this metadata is frequently auth-
enticated.


> Are they actually looking to use NFS?

Cloud operators that support Linux provide the guest's root
filesystem, where most of the guest OS's executables reside,
using ext4 on a virtual disk (or via iSCSI). ext4 supports
IMA. Cloud operators want to use that to guarantee to
customers that they are getting OEM software components that
have not been tampered with.

Some operators would like to use NFS for guest root file-
systems. They'd like to have the same support for measure-
ment in that environment as they have with ext4.

Conversely, a cloud operator may want to provide its own
particular versions of some executables, in which case it
can hash and sign them and provide the customers with its
public cert for verification.


> Unless such an application is part of the discussion, I don't think
> the working group should take this on.

The application that uses measurement metadata is the IMA
subsystem, which resides in the kernel with the filesystem
implementation, to be clear. The measurement subsystem is a
security module that is separate from the filesystem. No
part of any filesystem implementation alters or interprets
measurement metadata.

If tripwire is similar to IMA, then perhaps we are really
talking about a class of applications. Each member of that
class might have their own metadata format, much like the
various parties that might want to write into an NFSv4
security label, which oddly enough is also an opaque array
of bytes that is not interpreted by NFS.


> Tom.
> 
>> Our approach to this class of metadata has been to create
>> additional fattr4 attributes: ACLs, security labels, and
>> so on. Here we have something that has a definite purpose,
>> but no defined format.
>>> It seems that if
>>> those are present, there should be a story for NFS to use them. Or if not,
>>> then a portable, interoperable NFS-level definition.
>> The NFS protocol and NFS implementations do not have any
>> role in interpreting this metadata. All that is needed
>> is to store some additional bits that will be interpreted
>> elsewhere.
>> Seems like we've done this before: NFS security labels
>> are defined elsewhere, and are not interpreted by NFS
>> itself. User extended attributes, named streams are not
>> interpreted by NFS, and are separate from file content.
>> IMO it's valid to claim that interoperability in this
>> case is out of scope.
>>> Hitching onto a
>>> sidetracked train doesn't seem, to me, a recipe for success.
>>> Just my view from another cheap seat.
>>> 
>>> Tom.
>>> 
>>>> -----Original Message-----
>>>> From: nfsv4 <nfsv4-bounces@ietf.org> On Behalf Of Chuck Lever
>>>> Sent: Tuesday, August 28, 2018 4:06 PM
>>>> To: Spencer Dawkins at IETF <spencerdawkins.ietf@gmail.com>
>>>> Cc: NFSv4 <nfsv4@ietf.org>
>>>> Subject: Re: [nfsv4] Linux IMA on NFS follow-up
>>>> 
>>>> 
>>>> 
>>>>> On Aug 28, 2018, at 3:13 PM, Spencer Dawkins at IETF
>>>> <spencerdawkins.ietf@gmail.com> wrote:
>>>>> 
>>>>> Hi, Chuck,
>>>>> 
>>>>> You invited comments from the "cheap seats" in your note, but I think that's
>>>> actually me, and people who understand what's going on better than I do
>>>> would be in the orchestra pit seats. So I'd also invite comments from people
>>>> who understand what's going on better than I do.
>>>> 
>>>> According to the RFC Editor, as AD you are the final
>>>> authority on what is an adequate set of citations
>>>> for the NFS specs we publish, so you get to be the
>>>> conductor today.
>>>> 
>>>> Or anyway, you get first crack at an opinion.
>>>> 
>>>> 
>>>>> Having said that ...
>>>>> 
>>>>>> On Tue, Aug 28, 2018 at 1:38 PM Chuck Lever <chuck.lever@oracle.com>
>>>> wrote:
>>>>>> Hi Spencer D. !
>>>>>> 
>>>>>> During our meeting in Montreal last month, I presented a backgrounder
>>>>>> on supporting Linux IMA (file integrity measurement) on NFS.
>>>>>> 
>>>>>> A stumbling block to forward progress of the IMA-on-NFS specification
>>>>>> is the lack of any standard describing IMA. You recommended reaching
>>>>>> out to the Linux IMA community to inquire if they had plans for
>>>>>> standardizing IMA. I have done this:
>>>>>> 
>>>>>> 
>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.spi
>>>> nics.net%2Flists%2Flinux-
>>>> integrity%2Fmsg03399.html&amp;data=02%7C01%7Cttalpey%40microsoft.co
>>>> m%7C18f04391586c4fcee43308d60d21a54e%7C72f988bf86f141af91ab2d7cd
>>>> 011db47%7C1%7C0%7C636710835491618174&amp;sdata=Up9RBEFvcwXzx9
>>>> hcDCBnYO3U1usX4MEwHlOZGbFZ83s%3D&amp;reserved=0
>>>>>> 
>>>>>> And received no response. I conclude that there is no active effort
>>>>>> and perhaps no desire to standardize Linux IMA.
>>>>> 
>>>>> I THINK what we're talking about here, is a stable reference for draft-ietf-
>>>> nfsv4-integrity-measurement to point to. Does that sound right?
>>>> 
>>>> Yes, that was the problem described in Montreal.
>>>> 
>>>> 
>>>>> I'd like to better understand what reference is available - whether it is
>>>>> 	• a versioned description with a stable URL
>>>>> 	• an unversioned description
>>>>> 	• "the code is in github, good luck"
>>>>> 	• or some variation along that spectrum
>>>> 
>>>> There is a wiki with a white paper, and there is what
>>>> is implemented in Linux.
>>>> 
>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourcefor
>>>> ge.net%2Fp%2Flinux-
>>>> ima%2Fwiki%2FHome%2F&amp;data=02%7C01%7Cttalpey%40microsoft.com
>>>> %7C18f04391586c4fcee43308d60d21a54e%7C72f988bf86f141af91ab2d7cd01
>>>> 1db47%7C1%7C0%7C636710835491618174&amp;sdata=iIaZX2iTXbmTvIqGuz
>>>> OTJ97Zm7Sz6Y6MaWezWZA9vj0%3D&amp;reserved=0
>>>> 
>>>> So, some from row B and some from row C. And some man
>>>> pages. It's a practical implementation, not something
>>>> that was conceived by standard and later implemented.
>>>> 
>>>> However, all the participating filesystem needs to do
>>>> is store some security metadata. So I would like the
>>>> NFS pieces to be entirely agnostic to the metadata
>>>> format, and instead focus on:
>>>> 
>>>> a) how to find this metadata
>>>> b) how large it can be
>>>> c) how to protect it in-transit
>>>> d) how to authorize access and updates to it
>>>> 
>>>> 
>>>>> I think having a stable reference matters more than something being a
>>>> "standard", from our perspective.
>>>> 
>>>> We could cite the URL where the white paper resides, as
>>>> an Informative reference, but I'm not certain that is a
>>>> "stable" URL. Maybe the wiki is stable enough?
>>>> 
>>>> 
>>>>>> Therefore I propose the following changes to
>>>>>> draft-ietf-nfsv4-integrity-measurement:
>>>>>> 
>>>>>> - Replace all specific mention of IMA with general discussion of
>>>>>>   purpose and use cases
>>>>>> - Rename the new attributes with non-specific names; for example
>>>>>>   fattr4_signature_content, fattr4_signature_attributes, and
>>>>>>   fattr_signature_attrlist
>>>>>> - REQUIRE that the material stored in the first two attributes is
>>>>>>   self-describing, such that the integrity measurement subsystems
>>>>>>   on NFS endpoints can properly interpret and utilize their content
>>>>> 
>>>>> So, is the goal here to be resilient to changes in IMA, or to be resilient to
>>>> replacing IMA with something else?
>>>> 
>>>> Mostly the former goal. The latter is hypothetical at this
>>>> point, but possible down the road.
>>>> 
>>>> 
>>>>>> Do you feel this is adequate for the purposes of standardization? Are
>>>>>> there other approaches you would like me to consider?
>>>>> 
>>>>> I'd only be looking for some way to achieve interoperation, so I'd be listening
>>>> for feedback from people who will implement this and deploy this mechanism.
>>>> 
>>>> Fair enough.
>>>> 
>>>> The issue of interoperation is IMA's problem: they need to
>>>> be able to add/remove features while remaining compatible
>>>> with what's already in on-disk filesystems, as their vision
>>>> of IMA evolves. IOW they already have to solve this problem
>>>> with local filesystems.
>>>> 
>>>> 
>>>>> I hope that's helpful!
>>>>> 
>>>>> Spencer (D)
>>>>> 
>>>>>> Comments/suggestions from the cheap seats (tm David Black) also welcome.
>>>>>> 
>>>>>> --
>>>>>> Chuck Lever
>>>> 
>>>> --
>>>> Chuck Lever
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> nfsv4 mailing list
>>>> nfsv4@ietf.org
>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf
>>>> .org%2Fmailman%2Flistinfo%2Fnfsv4&amp;data=02%7C01%7Cttalpey%40micr
>>>> osoft.com%7C18f04391586c4fcee43308d60d21a54e%7C72f988bf86f141af91a
>>>> b2d7cd011db47%7C1%7C0%7C636710835491628183&amp;sdata=NQQdpaw
>>>> GC19QWioBOPkj2O7SnLlvweZvYSNhsLEt1MU%3D&amp;reserved=0
>> --
>> Chuck Lever
>> _______________________________________________
>> nfsv4 mailing list
>> nfsv4@ietf.org
>> https://www.ietf.org/mailman/listinfo/nfsv4
> 
> _______________________________________________
> nfsv4 mailing list
> nfsv4@ietf.org
> https://www.ietf.org/mailman/listinfo/nfsv4

--
Chuck Lever