Re: [secdir] Secdir review of draft-ohba-pana-relay

Yoshihiro Ohba <yoshihiro.ohba@toshiba.co.jp> Fri, 10 December 2010 07:46 UTC

Return-Path: <yoshihiro.ohba@toshiba.co.jp>
X-Original-To: secdir@core3.amsl.com
Delivered-To: secdir@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id DF7DF3A6C67; Thu, 9 Dec 2010 23:46:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.089
X-Spam-Level:
X-Spam-Status: No, score=-4.089 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_JP=1.244, HOST_EQ_JP=1.265, RCVD_IN_DNSWL_MED=-4, UNPARSEABLE_RELAY=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gglVnDcAH1oF; Thu, 9 Dec 2010 23:46:48 -0800 (PST)
Received: from imx2.toshiba.co.jp (inet-tsb5.toshiba.co.jp [202.33.96.24]) by core3.amsl.com (Postfix) with ESMTP id 80FAD3A6A2B; Thu, 9 Dec 2010 23:46:48 -0800 (PST)
Received: from arc1.toshiba.co.jp ([133.199.194.235]) by imx2.toshiba.co.jp with ESMTP id oBA7lV75009527; Fri, 10 Dec 2010 16:47:31 +0900 (JST)
Received: (from root@localhost) by arc1.toshiba.co.jp id oBA7lV7X015305; Fri, 10 Dec 2010 16:47:31 +0900 (JST)
Received: from unknown [133.199.192.144] by arc1.toshiba.co.jp with ESMTP id SAA15304; Fri, 10 Dec 2010 16:47:31 +0900
Received: from mx.toshiba.co.jp (localhost [127.0.0.1]) by ovp2.toshiba.co.jp with ESMTP id oBA7lVMm027001; Fri, 10 Dec 2010 16:47:31 +0900 (JST)
Received: from tsbpoa.po.toshiba.co.jp by toshiba.co.jp id oBA7ikvh006944; Fri, 10 Dec 2010 16:47:09 +0900 (JST)
Received: from [133.196.17.90] by mail.po.toshiba.co.jp (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTPA id <0LD7006Y1C91W050@mail.po.toshiba.co.jp>; Fri, 10 Dec 2010 16:46:13 +0900 (JST)
Date: Fri, 10 Dec 2010 16:46:07 +0900
From: Yoshihiro Ohba <yoshihiro.ohba@toshiba.co.jp>
In-reply-to: <4D009D34.1020809@deployingradius.com>
To: Alan DeKok <aland@deployingradius.com>
Message-id: <4D01DABF.6060604@toshiba.co.jp>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-2022-JP
Content-transfer-encoding: 7bit
References: <4D009D34.1020809@deployingradius.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6
Cc: secdir@ietf.org, draft-ohba-pana-relay@tools.ietf.org, 'Alper Yegin' <alper.yegin@yegin.org>, margaretw42@gmail.com, pana@ietf.org, paduffy@cisco.com, robert.cragie@gridmerge.com, samitac@ipinfusion.com, Ralph Droms <rdroms.ietf@gmail.com>
Subject: Re: [secdir] Secdir review of draft-ohba-pana-relay
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Security Area Directorate <secdir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/secdir>
List-Post: <mailto:secdir@ietf.org>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Dec 2010 07:46:50 -0000

Thank you very much for reviewing the draft.  Please see my comments
below.

(2010/12/09 18:11), Alan DeKok wrote:
> I have reviewed this document as part of the security directorate's
> ongoing effort to review all IETF documents being processed by the
> IESG. These comments were written primarily for the benefit of the
> security area directors. Document editors and WG chairs should treat
> these comments just like any other last call comments.
> 
> Margaret Wasserman said:
>> IMO, there is (at least) one way in which the introduction of a relay
>> changes the security model for PANA.  In the original PANA protocol,
>> the PANA Authentication Agent (PAA) determines the source IP Address
>> and source UDP Port number of the PANA Client (PaC) by looking in the
>> headers of the request, and responds to that IP Address/Port.
>> However, in the case where a relay is being used, the client IP
>> Address/Port are included in an option in the relay message.  Requests
>> are sent from the relay and responses are sent to the relay, using the
>> IP Address/Port in the headers, but the client (using information from
>> the option) is authenticated.  I understand that this changes the
>> security properties of the PANA exchange, but I am not sure if it
>> changes them in a way that matters for the PANA protocol.
>>
>> So, I could use help here from someone who understands EAP (and
>> ideally, PANA) well enough to understand how/if a relay can safely be
>> used in a PANA environment.
> 
>    The proposed document doesn't affect the security of EAP.  EAP is
> already transported over insecure and unauthenticated channels (i.e.
> EAPoL), so changing the PANA transport requirements should have no
> effect on EAP.
>
>    Some questions:
> 
> Are multiple relays allowed?  If so, how do they work?  If not, how are
> they detected, and forbidden by the participants?
> 

Relaying happens only one time for each message belonging to the same
PANA session.  We can clarify this in the draft.

>    The Security Considerations section says:
> 
>     Since the PRE does not maintain per-PaC state, the PRE is robust
>     against resource consumption DoS (Deniable of Service) attack.
> 
>    However, the PRE relays packets to the PaC.  This means that entities
> on the PAA network can now send PANA messages to the PaC, when they
> previously could not.  While the PaC is supposed to discard invalid
> and/or unexpected messages (RFC 5191), the PRE can be used to send
> messages to *arbitrary* UDP ports on the PaC or any other machine in the
> PaC network.
> 
>    The same attack applies (but less so) in the inverse direction.  A
> fake PaC can send the PAA arbitrary PANA messages.  Since this can
> already happen today, there is no new issue here.
> 
>    Having a stateful PRE would help address this attack.  It would not
> prevent it, as the PANA messages are unsigned, and anyone can pretend to
> be the PRE.
> 
>    I would suggest requiring that the PRE enforce the Message Validity
> checks of RFC 5191, Section 5.5.  If this cannot be done in its
> entirety, this draft should add a new section entitled "Message Validty
> checks for the PRE".
> 
>    e.g. The PRE MUST relays only well-formed PANA messages to the PAA.
> And before relaying messages back to the PaC, it ensures that the
> Relayed-Message AVP contains a well-formed PANA message.  All malformed
> messages MUST be discarded.
> 

I agree that some message validity check at the PRE can help address
issues you mentioned above.  In my analysis: (1) Some check requires
the PRE to be stateful (e.g., sequence number check on relayed PANA
message requires the PRE to keep track of sequence numbers for each
session), (2) some check does not require the PRE to be stateful
(e.g., message length check), and (3) some check is impossible unless
security is compromised (e.g., AUTH AVP check of relayed PANA message
using the PANA SA between the PaC and the PAA).  Let's discuss (1) and
(2).   There are several design choices here:

(a) (1) and (2) are mandatory
(b) (1) is optional, (2) is mandatory
(c) (1) and (2) are optional

I listed these choices because ZigBee has chosen pana-relay mainly
because of the stateless nature of PRE in its current design and I
think that making PRE stateful can be a too strong requirement for ZigBee.

(Just to clarify, "stateless" here means that per-PaC state does not
need to be maintained by PRE.)

>    Since the behavior of the PAA is also changing, it would be good to
> leverage the PAA session tracking to add a cryptographic token between
> the PRE and PAA.  This token would be added by the PRE prior to relaying
> a message, and the PAA could echo it back in the response.   This
> ability means that the PRE is still stateless (in terms of tracking
> packets), but gains a little bit of security by maintaining additional
> state.
> 
>   The token would be subject to eavesdropping, so it offers small
> additional security.  Adding it is a recommendation, not a requirement
> of this review.
> 
>    The token could be (for example) a signature of the PaC source IP and
> port, using a secret known only to the PaC, and generated automatically.
>   The secret would also need to change periodically.
> 
>    Along with Message Validation, this token would increase the bar for
> attackers sending packets to the PaC.  Rather than simply being able to
> leverage the PRE to send arbitrary traffic to the PaC, the attacker
> would need to be able to monitor PRE ->  PAA traffic, and to then send
> well-formed PANA messages to the PaC, to the port used by the PaC for
> receiving PANA messages.  That minimizes the attack exposure.
> 

To address Margaret's security comment, we (co-authors) are currently
discussing whether we can recommend use of DTLS to protect PRY message
between PRE and PAA for less-trusted environment.  Your suggested
token-based approaches (PRE-generated and PaC-generated tokens) can be
another recommendation for similar environment.  I think we need to
consider tradeoff between the level of improvement in security and the
required cost for each alternative.

> 
>     There is also some confusion between PRE and PRY, such as:
> 
>     (c) The source IP address and UDP port number of the PRY is stored in
>     a new PANA session attribute "IP address and UDP port number of the
>     PRE".
> 
>    The text should consistently refer to "address of the PRE", or
> "address carried within the PRY"

We will improve the consistency about referring to addresses.

Thank you,
Yoshihiro Ohba

> 
> 
>    Alan DeKok.
> 
>