Re: [Rift] RIFT fingerprint coverage

Tony Przygienda <tonysietf@gmail.com> Mon, 22 July 2019 14:11 UTC

Return-Path: <tonysietf@gmail.com>
X-Original-To: rift@ietfa.amsl.com
Delivered-To: rift@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C16F512017D for <rift@ietfa.amsl.com>; Mon, 22 Jul 2019 07:11:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Level:
X-Spam-Status: No, score=-1.997 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, 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 LVwJxUeBd0FS for <rift@ietfa.amsl.com>; Mon, 22 Jul 2019 07:11:16 -0700 (PDT)
Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (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 D231B1201E2 for <rift@ietf.org>; Mon, 22 Jul 2019 07:11:13 -0700 (PDT)
Received: by mail-ed1-x52b.google.com with SMTP id i11so40755816edq.0 for <rift@ietf.org>; Mon, 22 Jul 2019 07:11:13 -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; bh=Z/B6zh93lPhrTMR5GRpWtIz7SA1N2hiltH3ePQhq7SI=; b=T32znastLYpAnMh7mDsLP4vDLSoIq2+EA9XFUUa7A796C/FobdoYiLofqn1pM+MrOI 7rznkmT2g9FpZXqJXxgYsVzex8IztUCXKZoY4UF1YRnsJxP+NTiLFlZt5pdhHSm/f1RK /KP+LK8nuTKNQpPszVm9yKjLQ13qDVObIgcxWlXznHchGguQGuXLYrR5PoP39WLr6HmQ OV6e3gq6x7xvua9PuBMpQdISpPsEvE4m/9mzLCo4tbVuqZqscW6AME46mncbxO+cXH5e EZG5Dw0rqEa6ahk3EUpa2x8ll6qJU1+u9uhfAD3gG6P24aiT8hNjc5hY9FewdyUUMtYi ZgnQ==
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; bh=Z/B6zh93lPhrTMR5GRpWtIz7SA1N2hiltH3ePQhq7SI=; b=Pt2lNhPxObr87igqmJPcwRB/T5koGSEFMHpeK5oYRN5NPVv6drLXMxfrtCQ2l4gaKs NYxdx+ZB6Ey6Kvz8avskXrZ1GD8rArjRWOrGlTAJtQweHsNKn5uqO9scOKCLw0ppAzag Y8QjKbuONadXMHJTjRdAGnw02J1d3j0RHrz4S4UqGV4i7fnu33by7SgFf+dUMqB/ZBBO HNf1hR1stUFwET6pfbeP6t6ClsRlZQ0+EwooDOrDSUICB+w02H3DSirXVUHDnRSXEs3P d24Cb/0+pgNu1kKBPBynZFritXdNgvMdZc5JIcW26mx8St+Mo3ZIQ3vai4zwtseIg7+v nZdA==
X-Gm-Message-State: APjAAAX32OgVxKB+WdZj/UVyFkur7SlKe/Jygrw0ZMd26iE9KSgAIi9A SwjS08lnDbQjwwV+jjLXfCuwfaT5ZXhciBliCUg=
X-Google-Smtp-Source: APXvYqxPbtde6LUlr9/XT4p6fVJFSy+cuMgmTdSL2PGA+Tyu/voNEvaigYLNjK/bW68Ggu4PwsMuw7mn1gEkaI7gMPo=
X-Received: by 2002:a17:906:7f91:: with SMTP id f17mr51919855ejr.250.1563804672428; Mon, 22 Jul 2019 07:11:12 -0700 (PDT)
MIME-Version: 1.0
References: <CF366357-79EA-4395-9024-09A371795695@gmail.com> <F165CA6D-3537-4310-8453-77B069F69414@gmail.com> <MWHPR05MB32795B106572C9AD42A30DCFACC50@MWHPR05MB3279.namprd05.prod.outlook.com> <55967EF3-3612-4173-80AB-44AB530FB338@gmail.com>
In-Reply-To: <55967EF3-3612-4173-80AB-44AB530FB338@gmail.com>
From: Tony Przygienda <tonysietf@gmail.com>
Date: Mon, 22 Jul 2019 10:10:38 -0400
Message-ID: <CA+wi2hOSwmi1zTd6UvtMGjZxEH8nh9-wLrfd_-CiZP0o9v06vg@mail.gmail.com>
To: Bruno Rijsman <brunorijsman@gmail.com>
Cc: Antoni Przygienda <prz@juniper.net>, "rift@ietf.org" <rift@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000ff8e2f058e45a5f4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/rift/NH6p06PiAMRij2dNd2xcK2ls3NM>
Subject: Re: [Rift] RIFT fingerprint coverage
X-BeenThere: rift@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Discussion of Routing in Fat Trees <rift.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rift>, <mailto:rift-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rift/>
List-Post: <mailto:rift@ietf.org>
List-Help: <mailto:rift-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rift>, <mailto:rift-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 22 Jul 2019 14:11:19 -0000

I think we misunderstood. If you validate things _before_ a fingerprint
(which we have here, without lenght in front of fingerprint we don't know
where to find it) you normally compute the fingerprint over empty
fingerprint & you have to validate the same way. This is normally the place
where problems occur due to unusal logic necessary in the right sequence

I agree, the discussion is is there an attack worth doing the extra work, I
don't see one + as I say we not really protect anything since we access the
fields before fingerprint anyway and any change, if not failing before
fingerprint will make fingerprint invalid anyway ...

--- tony


On Sun, Jul 21, 2019 at 12:04 PM Bruno Rijsman <brunorijsman@gmail.com>
wrote:

>
>
> On Jul 21, 2019, at 4:22 PM, Antoni Przygienda <prz@juniper.net> wrote:
>
>
>
> 3. second, even if we do I don't think we improve the attack envelope or
> actually worsen it. Let's go through it
>
>    1. major version is attacked, any change will drop the packet due to
>       mismatch. if we protect it, we calculate the hash and it fails and outcome
>       is the same modulo we can be computationally overrun
>       2. outer key id is attacked/fingerprint length is attacked, all
>       same outcome ...
>
> now, you can argue that an attacker can modify stuff _behind_ the
> fingerprint and with that attack protocol computationally but there is no
> way around that, we won't detect modification otherwise wheeras modifying
> major version/key id/fingerprint lenght basically leads to drops on any
> change and protecting them only exposes us computationally for no benefit
>
>
> The receiving RIFT router can drop packets with the wrong major version,
> with a wrong key-id (not in the accept key set), or a wrong
> fingerprint-length, *without* validating the fingerprint first.
>
> This is for the same reason that a RIFT router can drop a packet with an
> out-of-range weak-nonce *without* validating the fingerprint first.
>
> In general, it is safe to reject a packet when any field has some
> unacceptable value *without* validating the fingerprint first.
>
> So, protecting these additional fields does not open up any new CPU denial
> of service attacks.
>
> If a RIFT router is planning to accept a packet because all fields have an
> acceptable value, then it must validate the fingerprint first before doing
> so.
>
> Or if a RIFT router is going to reject a packet but take some protocol
> action based on some field in that rejected packet anyway, then it would
> have to validate the fingerprint as well (happily, which currently don’t
> have this scenario in RIFT, as long as the packet-nr is truly only used for
> debugging and not for flow-control, for example).
>
> So, the real question is: how sure are you that leaving the major-version,
> key-id, and fingerprint-lengths fields unprotected will not lead to some
> problems down the road?  (To quote Dirty Harry: “Do you feel lucky? Well,
> do ya, punk? :-)
>
> — Bruno
>
>