[Ntp] Re: [EXT] [EXT] Focussing loop detection on loop detection only.

Miroslav Lichvar <mlichvar@redhat.com> Tue, 14 July 2026 13:41 UTC

Return-Path: <mlichvar@redhat.com>
X-Original-To: ntp@mail2.ietf.org
Delivered-To: ntp@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id EC6711168B6A0 for <ntp@mail2.ietf.org>; Tue, 14 Jul 2026 06:41:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1784036473; bh=RuaxAULK51vVHCcl5zZ/jg8S52NHiGtNMmXw/qcSEdk=; h=Date:From:To:Subject:References:In-Reply-To; b=sE+d8MX05DyHxR25algh0Yf9L8+S6P665wCS1mJdviyxcYwbtQjv9z56X4WHA89Z4 dyT6yql8p091lPuzVZkK7i4+Zax6Z6v5FFBTp9DcdmLRSgheVsTZ3IYLymLO8c4tkz wlaAdwfDUe6hf49QJwk22DzivatnnKu25wb5AtiA=
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: 1.239
X-Spam-Level: *
X-Spam-Status: No, score=1.239 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, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_NONE=0.001] autolearn=no autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NOel8QWuPrhf for <ntp@mail2.ietf.org>; Tue, 14 Jul 2026 06:41:13 -0700 (PDT)
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id F368C1168B64B for <ntp@ietf.org>; Tue, 14 Jul 2026 06:40:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784036446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zFvYCSlRP0DJwf1Wyr9ZfCYTRAMF05JVfyCVhto+ZJg=; b=AIpbmHjl5uuIP0G5g6kcmgzwk0rOhEj3NI/YD6ZFliVQHvgNqh2GBwLSr2iYdDf4PT1Qrf zI+ymqci4kLnv7sRIRag3sxiVS0FF0QwEufKFp6eQ4N8ZlVFGmVDuOU0/SeKtviq9/3SsP Q+tOnhjKbWgDcLyVAkII4Ftc3fytitU=
Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-638-viOKR2lgNuqvEF24TAXwsw-1; Tue, 14 Jul 2026 09:40:45 -0400
X-MC-Unique: viOKR2lgNuqvEF24TAXwsw-1
X-Mimecast-MFC-AGG-ID: viOKR2lgNuqvEF24TAXwsw_1784036444
Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B81DB1956040 for <ntp@ietf.org>; Tue, 14 Jul 2026 13:40:44 +0000 (UTC)
Received: from localhost (unknown [10.43.135.229]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 290C3180028B for <ntp@ietf.org>; Tue, 14 Jul 2026 13:40:43 +0000 (UTC)
Date: Tue, 14 Jul 2026 15:40:42 +0200
From: Miroslav Lichvar <mlichvar@redhat.com>
To: ntp@ietf.org
Message-ID: <alY8WkPUFBNuWSSq@localhost>
References: <CAPz_-SUxrGMUy2UJ1vcfX5jb3FSHqXZ3VAuhwSfxTRMrbTj28g@mail.gmail.com> <51c8db95f8434a0ba5c70e8a44e4e490@ukr.de> <ak9X-6YSlkBsak-7@localhost> <CAPz_-SUGakuWsS4CnbR9LdzzVP+Jeoa_XjcE6K8XbmjZ7LR7nA@mail.gmail.com>
MIME-Version: 1.0
In-Reply-To: <CAPz_-SUGakuWsS4CnbR9LdzzVP+Jeoa_XjcE6K8XbmjZ7LR7nA@mail.gmail.com>
X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111
X-Mimecast-Spam-Score: 0
X-Mimecast-MFC-PROC-ID: jzH_d43nPUm8M2dfMPL48xDfoLFHYpR49ggLOe6Df9s_1784036444
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
Message-ID-Hash: NI4H5TXCJCEM5JLHB54R3GJR7DOTIAFE
X-Message-ID-Hash: NI4H5TXCJCEM5JLHB54R3GJR7DOTIAFE
X-MailFrom: mlichvar@redhat.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-ntp.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Ntp] Re: [EXT] [EXT] Focussing loop detection on loop detection only.
List-Id: Network Time Protocol <ntp.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/Fv95Kex5hp3TdWU_Y2N8ZZPdeBg>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Owner: <mailto:ntp-owner@ietf.org>
List-Post: <mailto:ntp@ietf.org>
List-Subscribe: <mailto:ntp-join@ietf.org>
List-Unsubscribe: <mailto:ntp-leave@ietf.org>

On Tue, Jul 14, 2026 at 10:04:00AM +0200, David Venhoek wrote:
> The problem I see with not going after all loops is that we need to
> specify a way to decide which loops we do detect. The idea with a
> list, whilst nice in theory, has run straight into this wall in that
> we didn't have a concrete proposal how to do weighting with it last
> time, because of trouble with how to define those weights. At the same
> time, those weights are crucial for mixed-source using implementations
> like ntp-classic and ntpd-rs to work.

I didn't know there was a wall. For implementations that track and
combine time and frequency offsets independently (as chrony and
ntpd-rs do), I think the weight reported for the loop detection could
simply be the time offset weight (is that 1.0/offset_uncertainty in
ntpd-rs?). But I wouldn't want to make it a hard requirement. Maybe it
will turn out it's better to combine it with the frequency weight and
implementations should be able to do that. Or do you see some
interoperability issues coming from that? I can try to run some tests
with loops mixing different weighting, if you think it's important.

> The bloom filter, whilst not completely ideal, does deal with this
> well by just not bothering selecting which loops are important and
> which are not. I am not worried enough about malicious collisions to
> throw it out because of that, especially as most servers should (and
> will) have more carefully curated lists of sources which are trusted,
> and those sources can also cause headaches which are subtle just
> through the time sync alone, which may have more significant impact.

Yes, malicious servers can do interesting things by injecting
time/frequency offsets or faking root delay/dispersion etc. That
can be detected locally by comparing multiple sources. However, the
malicious collisions in the Bloom filter cannot be easily detected, at
least I don't see how. It can be coming from any source. Each server
would need to know the reference IDs of all servers it is directly and
indirectly serving, i.e. the same problem as loop detection itself.

-- 
Miroslav Lichvar