Re: [Ntp] Roughtime and Delay Attacks

Watson Ladd <watson@cloudflare.com> Thu, 04 April 2019 16:55 UTC

Return-Path: <watson@cloudflare.com>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9F85A120118 for <ntp@ietfa.amsl.com>; Thu, 4 Apr 2019 09:55:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cloudflare.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 C5h2ofhKR3cn for <ntp@ietfa.amsl.com>; Thu, 4 Apr 2019 09:55:28 -0700 (PDT)
Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (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 8368F1200C7 for <ntp@ietf.org>; Thu, 4 Apr 2019 09:55:28 -0700 (PDT)
Received: by mail-qk1-x72f.google.com with SMTP id z76so2048189qkb.12 for <ntp@ietf.org>; Thu, 04 Apr 2019 09:55:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4rP9KaxQT/NrRAs6+GbgoD8hhB2+iwiI5u7Rw7rpQ7g=; b=D4EXr+BfT9lj+Z6WPyZMsZuv8FhxRYrVPFHgiBCj5y9j3GX24zAkEb8FHeHgUONQ0n SMbqlqJ+n5pUpDeCI9mxo9rT29Wsi/duztWm+mX7vvB+ySwA09Q72ZrFGBSrHh57QIjZ uO0iGC0AGNQTn/QIrI6h2X/YyEn9GuzkWlLHo=
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=4rP9KaxQT/NrRAs6+GbgoD8hhB2+iwiI5u7Rw7rpQ7g=; b=eDMWCvYeElbO/RZ0XFJjnTfLmNIgjjJNsm1QucrEghuu6hrluD3t7bqlfijR2bQ8CJ TChjiBIBPK8Y3xQ9ywMgWUsJpGbQbzdbPtKcTM+7IG7j4Op7wiCSxy9YFVs++648NlkL IwTNKLP8PRjuuHNrvqoME8NISNcXhEXRzhLkZ5nVtV8q2qwj7VlZbmRSDwJCHZRCFPsP nrgabYkKXEpLZSgbD8rz0csM6cYvEWHY25hUhlB5Pdzu0ruqp6x8mcQ+D1HpHHjl5mRP kaSyq75GF3i3rFCcgMW8U7PDtDlXA+HZDVWG7qX8rf79tJw1XeKMh/3Gnj3cKtgxIe/n 2m0w==
X-Gm-Message-State: APjAAAV4TlEcA7ZAm9k7yUXP2zbvH63xFlqug15U1GE0G3z16ZE83De1 Mov9RHlV6kRZZYCNuGsQIB2TIQbz670t2ZTCPYd0og==
X-Google-Smtp-Source: APXvYqwvaLg0RcuYZqXVaawBbjzg/Py9JHiaNff2bthByRSE56W5N5m64o7lkubbTUh47dn7zB6H98e++k1rR2cGWak=
X-Received: by 2002:a37:b444:: with SMTP id d65mr6038545qkf.125.1554396927591; Thu, 04 Apr 2019 09:55:27 -0700 (PDT)
MIME-Version: 1.0
References: <20190403072255.EA16E40605C@ip-64-139-1-69.sjc.megapath.net> <OF1EB096AA.8F10FC47-ONC12583D1.002B338D-C12583D1.002C46D5@ptb.de> <47b2705b-e29b-320b-c832-3d6c4e7feeb9@gmail.com>
In-Reply-To: <47b2705b-e29b-320b-c832-3d6c4e7feeb9@gmail.com>
From: Watson Ladd <watson@cloudflare.com>
Date: Thu, 04 Apr 2019 09:55:16 -0700
Message-ID: <CAN2QdAFgamnmehCodorszjM-=kt7QCd0ThFcACUu5CjpqP-stg@mail.gmail.com>
To: Stewart Bryant <stewart.bryant@gmail.com>
Cc: ntp@ietf.org
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/JjhM6kAfJV_ju8wZaT1j5fMxKIE>
Subject: Re: [Ntp] Roughtime and Delay Attacks
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Apr 2019 16:55:31 -0000

On Thu, Apr 4, 2019 at 2:00 AM Stewart Bryant <stewart.bryant@gmail.com> wrote:
>
> Sorry I am struggling to understand how the protection works.
>
> If C (who has just woken) sends a request to S, then all C knows is that
> T ~ Ts - 1/2 RTT. C can know that it was S that replied, but C cannot
> possibly know if S was lying or if an on-path router delayed the packet.

Correct.

>
> C can keep asking S, and within the limits of the server delay and the
> variation in the routing path and queuing delays RTT stay sort of
> constant, so C can be suspicious if it changes after it has been running
> or if Ts - 1/2 RTT changes by more than the known drift in its local
> clock. However routing paths do change and there are traffic congestion
> delays in networks.
>
> C can ask S', S'' etc and build up a picture of various servers time,
> but it has to be careful that the paths are disjoint and that S, S' and
> S'' have truly independent and authoritative master clocks.
>
> On the other hand, if the routers are compromised, then there are much
> worse things that can do, so we normally assume that they are truthful.
>
> So how does this design do better than "T ~ Ts - 1/2 RTT assuming S did
> not lie and also was not simply wrong"?

It doesn't. But this is fine. RTTs can be seconds, not hours.

>
> - Stewart
>
>
>
> _______________________________________________
> ntp mailing list
> ntp@ietf.org
> https://www.ietf.org/mailman/listinfo/ntp