Re: [babel] Minor clarification to HMAC

Mahesh Jethanandani <mjethanandani@gmail.com> Fri, 28 June 2019 17:58 UTC

Return-Path: <mjethanandani@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 674D812060B for <babel@ietfa.amsl.com>; Fri, 28 Jun 2019 10:58:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.996
X-Spam-Level:
X-Spam-Status: No, score=-1.996 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham 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 7Hu6ujIMZK52 for <babel@ietfa.amsl.com>; Fri, 28 Jun 2019 10:58:11 -0700 (PDT)
Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) (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 86A9F12075C for <babel@ietf.org>; Fri, 28 Jun 2019 10:57:58 -0700 (PDT)
Received: by mail-pf1-x42b.google.com with SMTP id i189so3351887pfg.10 for <babel@ietf.org>; Fri, 28 Jun 2019 10:57:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=CWbgvPVTG7Bpe4P2EabOReJmTxs0j4+sq2N0dWyasjI=; b=fPH+cuzz2XxF72Rg9/Jz97Bk/krL42TUqNl4tQY973MeAuiEDpqpPNZnngeLZ32dWf P1FrV1vCA8ql3CRL6CsA9UJ7pQmlPDNQtoxWPNcc5omNqzqPcKA7Ppdnoxw0qRJ0k4iy NZshAjwVmphLvPXb/Pm6vr+r5qt8u9Y49wiJ9KCqOTOjwGIFXMAnznjrWcE+P/82na8u /NO4Tl+HhZJ0yNy8by33p5+x+NZ5UX5BcfEJLcq2lBSFosd6lHCtpc/KOfAsLbRl+QL2 /430Jc2iOJIRP8Ej96XxKhfY7JjEPRU3bNs8I9rKzksT2t61IwL/ClCaGW9FLC/7bJMS UzQQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=CWbgvPVTG7Bpe4P2EabOReJmTxs0j4+sq2N0dWyasjI=; b=YIIc+WWg3crI8L9/w9G560ZgW4uVmHr5y8JBT2C9cUsoonqwbxx+7Um7Ip39tn84Vg ISMT4vx0V7pS6xBKj2NtxjDLq8JgKwi0zrAQV12IPbt44xBR/7QAAJyYjRSRq1CLKE5L VgzGtt/gkzwjZseXBzuztUe3eF8Nx5UzaeqWuHB7vtdoyobgylwRiZJQi/IkR4WMWEcs TgsT/7K2ToP6IEzAR5L3UE8N6Ylb/AgUJkckClk3P6/hBJkhRIhEilD/QgadLZYBrppV DzNke832b5iG47ZJQv1omORrWQudibzWf3MZa96/I2T6Sxo6ZpdUue+O2CbztdlmUmqX 2eig==
X-Gm-Message-State: APjAAAUZfQfT36LBQe3UbaROl06SR78Nz39pBmae5jHnR6M9ezN4klHt MUFT0kZxyOu0/NR5lMtacyTAMW3A
X-Google-Smtp-Source: APXvYqysIFx9q+ohF0Ehgac92t3dhDaIRF9SQJjj7m/frZV5ftz9QRRtAO8b18M/5VtkWHGZT+LrlA==
X-Received: by 2002:a17:90a:1904:: with SMTP id 4mr15097084pjg.116.1561744677761; Fri, 28 Jun 2019 10:57:57 -0700 (PDT)
Received: from [172.26.35.147] ([76.14.1.154]) by smtp.gmail.com with ESMTPSA id a3sm2696311pff.122.2019.06.28.10.57.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jun 2019 10:57:56 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail-8A7012C5-6106-4558-8344-2D7929A22F68"
Mime-Version: 1.0 (1.0)
From: Mahesh Jethanandani <mjethanandani@gmail.com>
X-Mailer: iPad Mail (16A404)
In-Reply-To: <CAPDSy+4GeUfq50NcF5xZg_2cb78w76FjYYFnffqWtKm=Kha+fw@mail.gmail.com>
Date: Fri, 28 Jun 2019 10:57:56 -0700
Cc: Markus Stenberg <markus.stenberg@iki.fi>, Babel at IETF <babel@ietf.org>, Juliusz Chroboczek <jch@irif.fr>
Content-Transfer-Encoding: 7bit
Message-Id: <B3BD48E4-BAE6-480A-AE3C-A912D5A861FD@gmail.com>
References: <874l49j158.wl-jch@irif.fr> <6C3AA518-8EF8-493A-835D-DE096E75D07B@iki.fi> <CAPDSy+4GeUfq50NcF5xZg_2cb78w76FjYYFnffqWtKm=Kha+fw@mail.gmail.com>
To: David Schinazi <dschinazi.ietf@gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/CAz_35SXec70MZF9T6JaKZsMBMU>
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: Fri, 28 Jun 2019 17:58:14 -0000

To me this sounds much like a SYN flood attack in TCP, where TCP resources were allocated before the ACK came back. And TCP had to come back to clarify this, rather than leave it as a implementation level detail.

If we agree that a MAY should be allowed, I would like to see some guidance given on some implementation choices including the fact that a separate table of pending challenges should be kept to prevent an attack. 

Thanks.

Mahesh Jethanandani
mjethanandani@gmail.com

> On Jun 28, 2019, at 10:45 AM, David Schinazi <dschinazi.ietf@gmail.com> wrote:
> 
> When a node detects a new neighbour (by receiving a multicast hello), it sends a challenge.
> I can imagine several ways to implement this:
> - create the neighbor entry at this point
> - have a separate table of pending challenges
> - come up with a clever stateless scheme involving cookies (maybe?)
> But how the node handles the challenge is an implementation matter.
> A rate-limiting and anti-DoS mechanism can be added to all of these.
> 
> Therefore, I support adding this MAY, because it gives implementors leeway.
> 
> David
> 
> 
>> On Fri, Jun 28, 2019 at 7:17 AM Markus Stenberg <markus.stenberg@iki.fi> wrote:
>> In terms of security properties, notably resource exhaustion/contention, I am bit leery of creating entry before validity of remote party is actually verified (= challenge response received). I prefer the old text. I am not quite sure why the second 'may need to be created' is there..
>> 
>> I guess naive implementation would just remember specific nonces it has sent/freceived, but for new peers you can also just use e.g. nonce that contains timestamp (+ peer address (+- something))[1], which allows challenge sender to remain stateless until challenge responder proves they have the key.
>> 
>> So -1 from me. (Yes, I do wear my tinfoil hat even during summer.)
>> 
>> Cheers,
>> 
>> -Markus
>> 
>> [1] extra stuff is mostly for replay protection purposes, but I am not sure if it is a threat or not in this case. I have just cycled 140km, sue me.
>> 
>> > On 28.06.2019, at 16.21, Juliusz Chroboczek <jch@irif.fr> wrote:
>> > 
>> > Dear all,
>> > 
>> > Sawssen and Étienne (in copy of this mail) are currently working on
>> > cleaning up and completing the reference implementation of draft-...-hmac.
>> > We have just realised that the draft is not quite clear on two points.
>> > 
>> > The draft says that a neighbour entry MUST NOT be created before HMAC is
>> > verified (Section 4.3 first bullet).
>> > 
>> > It later says that a neighbour entry "might need to be created" when
>> > a challenge is sent, and "may need to be created" when a challenge is
>> > received.  However, it does not say whether it is legal to create an entry
>> > earlier.
>> > 
>> > I would therefore like to kindly request the permission of the group and
>> > the chairs to add the following between the first and second bullet points
>> > of Section 4.3:
>> > 
>> >  * A neighbour entry for the sender of the packet MAY be created at this
>> >    stage.  (Alternatively, an implementation MAY delay the creation of
>> >    a neighbour entry until a challenge request or reply is received.)
>> > 
>> > This clarification does not invalidate any implementations, it just makes
>> > the intent of the draft authors more explicit.
>> > 
>> > -- Juliusz
>> > 
>> > 
>> > _______________________________________________
>> > babel mailing list
>> > babel@ietf.org
>> > https://www.ietf.org/mailman/listinfo/babel
>> > 
>> 
>> _______________________________________________
>> babel mailing list
>> babel@ietf.org
>> https://www.ietf.org/mailman/listinfo/babel
> _______________________________________________
> babel mailing list
> babel@ietf.org
> https://www.ietf.org/mailman/listinfo/babel