Re: [kitten] Kerberos extra round trips I-D revised

Nico Williams <nico@cryptonector.com> Tue, 11 November 2014 20:57 UTC

Return-Path: <nico@cryptonector.com>
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 7D6371AC3EF for <kitten@ietfa.amsl.com>; Tue, 11 Nov 2014 12:57:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.666
X-Spam-Level:
X-Spam-Status: No, score=-1.666 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=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 YP4ceBYm5Zf7 for <kitten@ietfa.amsl.com>; Tue, 11 Nov 2014 12:57:34 -0800 (PST)
Received: from homiemail-a108.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id 80C021AC3F1 for <kitten@ietf.org>; Tue, 11 Nov 2014 12:57:34 -0800 (PST)
Received: from homiemail-a108.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a108.g.dreamhost.com (Postfix) with ESMTP id 452C120058D80; Tue, 11 Nov 2014 12:57:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=RnFJJV3eFfOP38 ieryO2eZXl5cI=; b=CIeD5XKckBCYlixKgijokmPEJ2Q7iFsdKkg0lZGVvU4YG1 suNe/vesP2Db7qaSUIZUyzWNM7kbNt5LIWGFRlksR7RV9HmlKzmLOCHB0YqaIEK1 zFXkB7Uy2rnr7qZSiBGtFtQI32FNfT+VaK4XfjcJpezQkbH7beHzFKdcZ7WB4=
Received: from localhost (108-207-244-174.lightspeed.austtx.sbcglobal.net [108.207.244.174]) (Authenticated sender: nico@cryptonector.com) by homiemail-a108.g.dreamhost.com (Postfix) with ESMTPA id E7AB02005D82E; Tue, 11 Nov 2014 12:57:33 -0800 (PST)
Date: Tue, 11 Nov 2014 14:57:33 -0600
From: Nico Williams <nico@cryptonector.com>
To: Greg Hudson <ghudson@mit.edu>
Message-ID: <20141111205731.GO3412@localhost>
References: <20141027071704.GC14215@localhost> <alpine.GSO.1.10.1411071543280.27826@multics.mit.edu> <54625A6E.3000305@mit.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <54625A6E.3000305@mit.edu>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: http://mailarchive.ietf.org/arch/msg/kitten/o_XroPe5jE9Xy7mJszwdFT1KIjY
Cc: kitten@ietf.org
Subject: Re: [kitten] Kerberos extra round trips I-D revised
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: Tue, 11 Nov 2014 20:57:35 -0000

On Tue, Nov 11, 2014 at 01:50:22PM -0500, Greg Hudson wrote:

FYI, I had a separate replay cache avoidance I-D that I'm looking to
abandon and replace with this one.  I didn't adopt all of the content of
that older I-D.

> Replay caches help in two cases:
> 
> 1. They provide minimal protection when a krb5 exchange takes place over
> an unprotected channel and is used for authentication only, with no use
> of the resulting key.  This protection is minimal [...]

This affects SSHv2 in particular because it shares a service name with
things like rsh/rlogin/telnet, and those aren't always configured to
protect the entirety of their sessions.

It also affects every service in environments where every host-based
service shares a single long-term key on the same host.

It might be nice to simply make this go away by using 1.5rt for the AP
exchange wherever possible.

> 2. They prevent an entire session from being replayed, causing a
> properly authenticated request to be processed twice within the replay
> window.  This is not a concern when an acceptor subkey is used.  (I
> assume that legitimate initiators don't use prot-ready messages or send
> wrap tokens using the initiator subkey.  I think in practice RFC 4121
> implementations don't set the prot-ready flag and initiators never use
> the initiator subkey.)

PROT_READY is nice to have, but only for data that is not too sensitive.
E.g., if the first message sent will be something like "list new
messages", then that's OK, but if it's going to be "list activity in
bank account #..." then it may not be.

> A krb5 acceptor implementation generally does not know whether the
> application protocol will use the context key or whether there is a
> different case 1 acceptor using the same long-term acceptor keys.

That and the above point about multiple host-based services sharing a
single long-term key on any given host in some environments.

> Because of this, it is intrinsically difficult for an implementation to
> know that it is safe not to use a replay cache for case 1.

Yes.

> The extra round trips draft allows the acceptor to ask an initiator to
> encrypt a nonce, which would defeat a replay attack if everyone had to
> do it.  However:
> 
> * There is an easy downgrade attack on the extra round trip.  Until
> client implementations are ubiquitous enough for acceptors to turn off
> support for basic RFC 4121, an attacker can simply suppress the extra
> round trip.

Speaking of which, I'd meant to also have an authz-data element for
indicating willingness to use extra round trips.

> * The first authenticator must still be added to the replay cache if it
> might be used for a case 1 acceptor--and if this acceptor would be a
> case 1 acceptor without the extra round trip, allowing basic RFC 4121
> means it is still a case 1 acceptor.

See above comment about authz-data.

> So this doesn't really seem to give us replay cache avoidance until
> basic RFC 4121 can be turned off.

Or, rather, until all mechanism acceptor implementations on a host can
be upgraded.

> * Section 2.2.1 states that after a recoverable error, a fifth token is
> not required because of the nonce in the second token.  I am not sure
> this is true--the nonce in the second token was not necessarily
> encrypted; if it wasn't, an attacker could feed it to a legitimate
> initiator in a separate exchange.

The nonce should be tied to a single partially-established security
context.  It should not be accepted on other new contexts.

> * For pedagogical purposes, section 4 should probably be explicit about
> what the initiator does in response to a KRB-ERROR2 with a KDC_ERR_NONE
> code.

OK.

Nico
--