Re: [babel] Minor clarification to HMAC

Markus Stenberg <markus.stenberg@iki.fi> Sat, 29 June 2019 10:22 UTC

Return-Path: <fingon@kapsi.fi>
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 88D261200B2 for <babel@ietfa.amsl.com>; Sat, 29 Jun 2019 03:22:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.35
X-Spam-Level:
X-Spam-Status: No, score=-2.35 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=kapsi.fi
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 fX6D3bjzChUb for <babel@ietfa.amsl.com>; Sat, 29 Jun 2019 03:22:38 -0700 (PDT)
Received: from mail.kapsi.fi (mail.kapsi.fi [IPv6:2001:67c:1be8::25]) (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 DD0D212006B for <babel@ietf.org>; Sat, 29 Jun 2019 03:22:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:Mime-Version:Content-Type:Sender:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=uIydqKNZzkZ+AbaXM2xTc8SeM+5Rp1BWS8jgBFIFWeM=; b=lc5cGuL4dM+hbIkltAmNHfaSHG Ndza6Vq0bdGrSlpS59rW+mEKjkcafcLgb8nFqzLvqbaP/IXGPS81nQX/eHAT+xuHYfYu7qRYoiJKO IJ5J71uWnofL0cVOVsHhd03uCLlrRAE9Rtv22lxSTYfUtAG9TUkJOB6/L6pdDZ+1g87PBCLskzZk9 D3M904VU71jLwoFLcTOBDc7Eg2uxmjv8REdRtyM5aJTDlJJx33RGh21y6Fk66mIuRvOxxkpiScMOy y+mLfUDE60hymZj3RHL1w3+KIEHD2ym7O9H3RJ+jLxBjDpa8YClB8NhqmJ8umtJhyFIPk6IYj7gus NIJzwtdA==;
Received: from 91-155-69-60.elisa-laajakaista.fi ([91.155.69.60] helo=[192.168.42.210]) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <markus.stenberg@iki.fi>) id 1hhAV9-0002Xa-Cm; Sat, 29 Jun 2019 13:22:35 +0300
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
From: Markus Stenberg <markus.stenberg@iki.fi>
In-Reply-To: <87a7e01yxe.wl-jch@irif.fr>
Date: Sat, 29 Jun 2019 13:22:34 +0300
Cc: babel@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <5154BFF0-4BE3-4F72-AAA4-AC65DEDF2A97@iki.fi>
References: <874l49j158.wl-jch@irif.fr> <6C3AA518-8EF8-493A-835D-DE096E75D07B@iki.fi> <87ef3c20fh.wl-jch@irif.fr> <3CFB1069-5307-40F2-89DD-CA82CE2976A1@iki.fi> <87a7e01yxe.wl-jch@irif.fr>
To: Juliusz Chroboczek <jch@irif.fr>
X-Mailer: Apple Mail (2.3445.104.11)
X-SA-Exim-Connect-IP: 91.155.69.60
X-SA-Exim-Mail-From: markus.stenberg@iki.fi
X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/xKj0kAuAtkMX7K51Z5SDsp5ZXC0>
Subject: Re: [babel] Minor clarification to HMAC
X-BeenThere: babel@ietf.org
X-Mailman-Version: 2.1.29
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: Sat, 29 Jun 2019 10:22:39 -0000

I think I am being dense (I haven’t looked at the protocol in awhile), but 

a) babel-hmac does not have even reference to link-local address, and
b) 6126bis states it is used only to index remote entries

Doesn’t this mean that by forging the link-local addresses (which are not included in HMAC) and then replaying valid HMAC packets you can fill table as you want if this consideration is relaxed?

-Markus

> On 29 Jun 2019, at 13.14, Juliusz Chroboczek <jch@irif.fr> wrote:
> 
>> Is there some mechanism in place that prevents replay of historic
>> packets? As the HMAC key itself does not change over time, storing
>> (large amounts of) historic payloads with valid HMAC is not hard.
>> Tthe value is bit questionable GIVEN router ID is stable, but if it is
>> not, there is actually potential attack vector here..
> 
> It's not the router ID, it's the link-local IP address.  In order to
> create /n/ neighbour entries, an attacker needs to have captured correctly
> signed packets with /n/ distinct source IPs.  (That's per interface.  If
> an attacker is able to spoof packets on multiple interfaces, then the
> situation becomes worse.)
> 
> (I'm tempted to follow Mahesh's advice, and rewrite the last two
> paragraphs of the Security Considerations section with reference to
> RFC 4987.  Advice?)
> 
> -- Juliusz
>