Re: [kitten] [nfsv4] rpcsec-gssv3 multi-principal authentication

"J. Bruce Fields" <bfields@fieldses.org> Wed, 03 September 2014 19:29 UTC

Return-Path: <bfields@fieldses.org>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5F7AD1A6F14; Wed, 3 Sep 2014 12:29:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.568
X-Spam-Level:
X-Spam-Status: No, score=-2.568 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-0.668] autolearn=ham
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 NsgYYcc2Ms-n; Wed, 3 Sep 2014 12:28:58 -0700 (PDT)
Received: from fieldses.org (fieldses.org [174.143.236.118]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C1F231A6F01; Wed, 3 Sep 2014 12:28:58 -0700 (PDT)
Received: from bfields by fieldses.org with local (Exim 4.76) (envelope-from <bfields@fieldses.org>) id 1XPGEh-0006uw-S0; Wed, 03 Sep 2014 15:28:55 -0400
Date: Wed, 03 Sep 2014 15:28:55 -0400
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Nico Williams <nico@cryptonector.com>
Message-ID: <20140903192855.GA25363@fieldses.org>
References: <DC941FEB-725A-49E1-8C38-FF765454827C@netapp.com> <20140730163006.GG26316@fieldses.org> <alpine.GSO.1.10.1407311902230.21571@multics.mit.edu> <9BF7E3EA-59DB-4B91-A27A-659790AED727@netapp.com> <alpine.GSO.1.10.1408030153400.21571@multics.mit.edu> <alpine.GSO.1.10.1408201123060.21571@multics.mit.edu> <alpine.GSO.1.10.1409021306240.21571@multics.mit.edu> <20140903041240.GG2664@localhost> <20140903174741.GA24790@fieldses.org> <CAK3OfOipM10jM=e59q8hZd7niQGinQgWSBVFjKVabKRkvH1HUg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CAK3OfOipM10jM=e59q8hZd7niQGinQgWSBVFjKVabKRkvH1HUg@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: http://mailarchive.ietf.org/arch/msg/kitten/bEdywVCFAjfvsuK2Jq6x2zQAjY4
Cc: "kitten@ietf.org" <kitten@ietf.org>, "Adamson, Andy" <William.Adamson@netapp.com>, NFSv4 <nfsv4@ietf.org>
Subject: Re: [kitten] [nfsv4] rpcsec-gssv3 multi-principal authentication
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/kitten/>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Sep 2014 19:29:00 -0000

On Wed, Sep 03, 2014 at 01:32:46PM -0500, Nico Williams wrote:
> On Wed, Sep 3, 2014 at 12:47 PM, J. Bruce Fields <bfields@fieldses.org> wrote:
> > Sorry, I haven't been thinking about this, I'm probably confused, but I
> > think I was imagining an attack something like:
> >
> >         - I, a rogue client, sniff some random krb5 traffic from the
> >           user.
> >         - That traffic includes at least one (rpc header, mic of rpc
> >           header) pair.
> >         - I send a CREATE call using that rpc header as the nonce data.
> >
> > ?
> 
> It almost works, but remember, the server must have the security
> context to verify the MIC with, and that context will have to be tied
> to the same NFSv4 client ID (same session).

Argh, I'm totally confused.

Which context (inner or outer) is "the security context" in the above?

So the server will reject my attempt above because the inner context is
associated with a different clientid than the outer context?

I'm not even sure what it means for a gss context to be tied to a client
ID.

Maybe I'm just dense, but at a minimum I think this needs a much more
careful explanation.

> Oh, but maybe some servers have a global RPCSEC_GSS context handle?
> If so, that would be a problem.  In that case the server could pick
> the nonce.  Or the MIC could be taken over more content (e.g., also a
> MIC made with the client context).  Just in case, this would be a good
> change to make.

Fundamentally the (nonce, mic) pair here looks meaningless.  The network
is presumably already full of (data, mic(data)) pairs using this
context, what does it prove that you can supply me with one when you get
to choose the data?

--b.