Re: [babel] Roman Danyliw's Discuss on draft-ietf-babel-hmac-08: (with DISCUSS and COMMENT)

Donald Eastlake <d3e3e3@gmail.com> Thu, 17 October 2019 20:23 UTC

Return-Path: <d3e3e3@gmail.com>
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 53C2C1209B5; Thu, 17 Oct 2019 13:23:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.748
X-Spam-Level:
X-Spam-Status: No, score=-1.748 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 Eiq5GF_vzIJD; Thu, 17 Oct 2019 13:22:58 -0700 (PDT)
Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7F035120271; Thu, 17 Oct 2019 13:22:58 -0700 (PDT)
Received: by mail-il1-x143.google.com with SMTP id c12so3411700ilm.1; Thu, 17 Oct 2019 13:22:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=f73ZGUfMUYADTYYaDb6uSmpNcdboRo9f3oU9de8JjsE=; b=etsaTYTeC9mo7HzE7Z5E+kRXPAmJPu/PBOk7wrVIzwgwRSeQIkShDfdAtz7LaQSIOw TX8YgA4G21kaene1b+pK4EHdQnntsLfSu51cQCez7avAuV/FGgKb1Qb3H9ie4/0zp1Uu OqviO1jHE2xsQKWBYfE0E63Hwm+MWeTkI0t6Yt62b8yc41IXP2vQinVlwKjTcUeXagXz KwYElQUzY3XCHBLEoKodc6QG1k9fdLU6GZA+VOpfRKJkgMsyUjYo4YoB0cEwFUZ+KWw7 NbUzg4zQKWFK1D6OKY66f4Z2WhyAS5jnKQd8Z9/CQ9cQPnMBJxBTojRY2kEMtcGApiYN NNfg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=f73ZGUfMUYADTYYaDb6uSmpNcdboRo9f3oU9de8JjsE=; b=fSSf0ORVWe09MULta+MVouACvxki1vRpAyxZlOBzwDEJRXAAiuqDQcyToIkz1EoXL8 mxf/3/FDTR/rmWYdQFJBKHr375wMHjDvv3FeHJY1FhwaL2QnTbl5DPmhmUKGnu9ZKS7z qebnypTJwJqUoDzggqGfQ5L4AoxJF1CzGUn6Xn+HamRg4TD9Pp77EAtuWYPWSS5kP6hh j6bq/pQxEqlH2rMOqXDXXshR4tPOftVUS6zPgGI3vtIx/71bYglaaDjBeiyDfc6OKwDN zt8yOtv01kQ7vYZ+bC9BgnX3tFPLKVwrcas2HSOZUfTfnYBaDtFKynfPJR1ecK14ugNA sufQ==
X-Gm-Message-State: APjAAAXrpHcD0pSYWCwGkl4sLflSIv6LZbPHW9gwmEKHmRw2FR0LEx54 QB+xsSP1eHjhjC+YJzBHXobmZeOtwQ2944d1dPs=
X-Google-Smtp-Source: APXvYqxtYuOqltlPo12+fqkNt0yZJHG4LQkaeDTpdRyA96uUx5qWepJLLpMWsI1dEYXiG0KCJTkDOuFrXZaoTsaeqWI=
X-Received: by 2002:a92:38c9:: with SMTP id g70mr6259878ilf.83.1571343777699; Thu, 17 Oct 2019 13:22:57 -0700 (PDT)
MIME-Version: 1.0
References: <156520650683.8432.7109781814790904901.idtracker@ietfa.amsl.com> <87v9v7wyzz.wl-jch@irif.fr> <359EC4B99E040048A7131E0F4E113AFC01B3402CA5@marchand> <87blwoiuxo.wl-jch@irif.fr> <359EC4B99E040048A7131E0F4E113AFC01B348C8C1@marathon>
In-Reply-To: <359EC4B99E040048A7131E0F4E113AFC01B348C8C1@marathon>
From: Donald Eastlake <d3e3e3@gmail.com>
Date: Thu, 17 Oct 2019 16:22:46 -0400
Message-ID: <CAF4+nEGBCsLTfQyM8sk95-mf4-SFn-sqCP9CqJBMcXA+7nOxzQ@mail.gmail.com>
To: Roman Danyliw <rdd@cert.org>
Cc: Juliusz Chroboczek <jch@irif.fr>, "babel-chairs@ietf.org" <babel-chairs@ietf.org>, The IESG <iesg@ietf.org>, "babel@ietf.org" <babel@ietf.org>, "draft-ietf-babel-hmac@ietf.org" <draft-ietf-babel-hmac@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/jdAnOoUmYwvtLm-fUnTDdP4HDu4>
Subject: Re: [babel] Roman Danyliw's Discuss on draft-ietf-babel-hmac-08: (with DISCUSS and COMMENT)
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: Thu, 17 Oct 2019 20:23:01 -0000

Hi Roman,

Thanks for clearing your DISCUSS.

Donald
===============================
 Donald E. Eastlake 3rd   +1-508-333-2270 (cell)
 2386 Panoramic Circle, Apopka, FL 32703 USA
 d3e3e3@gmail.com

On Thu, Oct 17, 2019 at 3:11 PM Roman Danyliw <rdd@cert.org> wrote:
>
> Hello Juliusz!
>
> My apologizes for the long delay.  Thank you for addressing my DISCUSS points with the updated -08 and the discussion.  I've cleared my ballot.
>
> Roman
>
> > -----Original Message-----
> > From: Juliusz Chroboczek [mailto:jch@irif.fr]
> > Sent: Friday, August 16, 2019 6:53 PM
> > To: Roman Danyliw <rdd@cert.org>
> > Cc: Donald Eastlake <d3e3e3@gmail.com>; babel-chairs@ietf.org; The IESG
> > <iesg@ietf.org>; babel@ietf.org; draft-ietf-babel-hmac@ietf.org
> > Subject: Re: Roman Danyliw's Discuss on draft-ietf-babel-hmac-08: (with
> > DISCUSS and COMMENT)
> >
> > > Ah, I see it now in Section 4.3 Thanks for the pointer.  This text
> > > explains the issues of around keys processing.  I couldn't explicitly
> > > find text explaining when multiple HMAC TLVs should be sent.  Where
> > > should I be looking?
> >
> > Section 5 (key rotation), formerly Appendix A:
> >
> >    In order to perform key rotation, the new key is added to all the
> >    nodes; once this is done, both the old and the new key are sent in
> >    all packets, and packets are accepted if they are properly signed by
> >    either of the keys.  At that point, the old key is removed.
> >
> > >> I'm leaving this sentence as is -- after trying it out, I don't think
> > >> that mentioning the small amount of state caused by reception of a
> > >> UDP packet (an ND entry) is informative.
> >
> > > I'm not tracking.  "Whatsoever" is an absolute statement.  By all
> > > means caveat the sentence by saying no local Babel state (or something
> > > to that effect).
> >
> > Done.
> >
> > >>> (8) Section 1.  Per the “spoof of a malformed packet”, how would an
> > >>> HMAC address this?  Even assuming that a node discards the message
> > >>> without processing if the HMAC is bad, this would still be a problem
> > >>> from a malicious peer.
> >
> > >> Please explain.
> >
> > > The initial situation I had in mind was if there was a compromised
> > > Babel node.  It will have the key to produce a valid HMAC on the
> > > crafted packet to cause the peer Babel node to process the packet.
> >
> > Yes, this protocol assumes that only honest nodes know the secret key.  We
> > make no guarantees, not even of any kind, if you've lost your keys.
> >
> > > Another situation which would not involve a malicious Babel node with
> > > the key is a node running a buggy Babel implementation.  Imagine this
> > > implementation has some kind of (buffer overflow) vulnerability in the
> > > routines which parses the packet payload to find the HMAC TLV.  In the
> > > worst circumstance, this could hypothetically compromise the Babel
> > > node even before the code to verified HMAC and choose to discard the
> > > packet or not is made.
> >
> > Yes, it could.
> >
> > That is the reason why HMAC keys sit in the packet trailer rather than in the
> > packet body: you may use a simplified parser that is only able to parse the
> > packet trailer.  This parser does not modify any global state, it does not
> > modify the packet (there's no need to clear the MAC before recomputing it),
> > and it just returns one bit of information.  You are expected to vet this
> > specialised parser very carefully, or even run it out-of-process.
> >
> > This was debated by the WG; however, once both Toke (BIRD) and Weronika
> > and Clara (babeld) had implemented parsing the packet trailer, we agreed
> > that this approach makes the implementation much simpler and less error-
> > prone.
> >
> > -- Juliusz