Re: [Rift] RIFT fingerprint coverage

Tony Przygienda <> Mon, 22 July 2019 14:11 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C16F512017D for <>; Mon, 22 Jul 2019 07:11:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.997
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: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id LVwJxUeBd0FS for <>; Mon, 22 Jul 2019 07:11:16 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:4864:20::52b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id D231B1201E2 for <>; Mon, 22 Jul 2019 07:11:13 -0700 (PDT)
Received: by with SMTP id i11so40755816edq.0 for <>; Mon, 22 Jul 2019 07:11:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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;; 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: <> <> <> <>
In-Reply-To: <>
From: Tony Przygienda <>
Date: Mon, 22 Jul 2019 10:10:38 -0400
Message-ID: <>
To: Bruno Rijsman <>
Cc: Antoni Przygienda <>, "" <>
Content-Type: multipart/alternative; boundary="000000000000ff8e2f058e45a5f4"
Archived-At: <>
Subject: Re: [Rift] RIFT fingerprint coverage
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Discussion of Routing in Fat Trees <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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 <>

> On Jul 21, 2019, at 4:22 PM, Antoni Przygienda <> 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