Re: [babel] Comments about rfc7298bis

Denis Ovsienko <denis@ovsienko.info> Mon, 07 May 2018 22:36 UTC

Return-Path: <denis@ovsienko.info>
X-Original-To: babel@ietfa.amsl.com
Delivered-To: babel@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2F982129502 for <babel@ietfa.amsl.com>; Mon, 7 May 2018 15:36:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 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_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ovsienko.info
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 GDPmuPQXTM_N for <babel@ietfa.amsl.com>; Mon, 7 May 2018 15:36:51 -0700 (PDT)
Received: from sender-of-o51.zoho.com (sender-of-o51.zoho.com [135.84.80.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4756E124239 for <babel@ietf.org>; Mon, 7 May 2018 15:36:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1525732607; s=zohomail; d=ovsienko.info; i=denis@ovsienko.info; h=Date:From:To:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; l=3033; bh=tHTk/SxYqsZZbCbFpgwT66bZkYYYvN/Milu9cIgssXM=; b=dnFiGJ75kWe1kTzJWpYx1tGRzKmlfkq3L6RonpvGoWYKvWQO3JiDrMGMytemkQiv 2ANHtRSehZ17MoH5eTy9yMC+j2x0uCFw+LcvBP5PCFpUManlV1/+gLBDmjS5BWVgzZR dd/IPaSKcLysbXYvxc97Kco+NPCrDe0At4IFqqXk=
Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1525732607412368.08734622918234; Mon, 7 May 2018 15:36:47 -0700 (PDT)
Date: Mon, 07 May 2018 23:36:47 +0100
From: Denis Ovsienko <denis@ovsienko.info>
To: Babel at IETF <babel@ietf.org>
Message-ID: <1633cc005b2.fb8883bc31563.5518090263169039684@ovsienko.info>
In-Reply-To: <87sh737dci.wl-jch@irif.fr>
References: <87fu4huzgj.wl-jch@irif.fr> <1628e298460.cd82970b35329.4945272877112645380@ovsienko.info> <87muyi3eqi.wl-jch@irif.fr> <16296069fec.e13616a29759.8282754479379679955@ovsienko.info> <878ta1y8k0.wl-jch@irif.fr> <87sh7aaqpw.wl-jch@irif.fr> <16322fb2d40.b754c16418709.3274574589997739202@ovsienko.info> <87po2dzntf.wl-jch@irif.fr> <163258f779c.1272194bf35512.5113105590240148496@ovsienko.info> <8736z89zfq.wl-jch@irif.fr> <1632b79a2a7.d0dabacb43120.7322644504922173573@ovsienko.info> <87sh737dci.wl-jch@irif.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Priority: Medium
User-Agent: Zoho Mail
X-Mailer: Zoho Mail
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/wV_CFAWSN-POb-W6cUCwDG37GKE>
Subject: Re: [babel] Comments about rfc7298bis
X-BeenThere: babel@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "A list for discussion of the Babel Routing Protocol." <babel.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/babel>, <mailto:babel-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/babel/>
List-Post: <mailto:babel@ietf.org>
List-Help: <mailto:babel-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/babel>, <mailto:babel-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 07 May 2018 22:36:53 -0000

---- On Mon, 07 May 2018 15:24:45 +0100 Juliusz Chroboczek  wrote ---- 
>> Regarding your recent concerns about 7298-bis data items not fitting 
>> into output packets, the task of fitting protocol data items into 
>> a packet buffer is neither new nor really difficult. 
> 
>I think got it, sorry for being so slow. Contrary to what I believed, 
>7298bis only requires TS/PC sub-TLVs to be included in existing IHUs. It 
>does not require a full set of TS/PC sub-TLVs to be included in every 

You get this part right. IHUs appear in outgoing packets anyway. On an interface configured for authentication all IHUs start to have a TS/PC sub-TLV because an IHU is a reaction to a Hello, and only authentic Hellos make it in, thus the ANM table has a received TS/PC number to send back in every IHU.

>packet. See Section 5.4 point 4 -- it only requires rejecting packets if 
>there's no sub-TLV in a matching IHU. On the other hand, if a packet does 

Not quite. Section 5.4 item 4 means: if there are any IHU TLVs that are going to be actioned by the main protocol instance and do not quote a *fresh* *enough* TS/PC number of the incoming interface, discard the packet.

>not include a matching IHU, then it is accepted as soon as the TS/PC TLV 
>(not sub-TLV) is good. 

Correct.

>Is that right, Denis? 

Not exactly there yet, but I am glad to confirm this is much closer. Thank you for studying the details, Juliusz.

>If so, then I'd like to understand why this is safe. Intuitively, I'd say 
>that by allowing packets without a matching TS/PC sub-TLV, replay attacks 
>might still be possible. Now, the MUST in Section 3.4.3 of 6126bis 
>should mitigate most such attacks, but I'm still a little worried. 
> 
>Denis, can you please point me where you explain why accepting packets 
>with no matching TS/PC is safe? 

Let me try to answer this as far as I understand the question. If that is not what you mean, please ask again.

The new guard specifically triggers on stale (i.e. not proven fresh) IHUs and lets the timers do eventual handling of any related protocol structures. This is not completely and immediately safe, but it looks good enough. Specifically, it is still possible to intercept packets sent by a speaker, wait until it goes off the air and replay the packets soon enough for them to be accepted and processed normally (no more than once each packet). But the key difference is, in 7298-bis the time window for this spoofing is now limited and under control with TSPCMaxRTT. This is very close to MAX_HELLO_TIMESTAMP_DIFF and MAX_TC_TIMESTAMP_DIFF from RFC 7183, but without the need for all speakers to have synchronized clocks.

This 2-way TS/PC check is better than 1-way but not as good as 3-way. However, my understanding is, for multicast protocol exchange 2-way is as far as it can scale (i.e. hundreds of neighbours on a single segment would have a hard time trying to maintain O(n**2) 3-way unicast exchanges).

Do you see any ways for this to go wrong?

-- 

    Denis Ovsienko