Re: [Ntp] WG Call for Adoption: draft-stenn-ntp-extension-fields

Miroslav Lichvar <mlichvar@redhat.com> Thu, 27 September 2018 09:06 UTC

Return-Path: <mlichvar@redhat.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 9206A130F37 for <ntp@ietfa.amsl.com>; Thu, 27 Sep 2018 02:06:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.901
X-Spam-Level:
X-Spam-Status: No, score=-6.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 OrQUlIuQUavP for <ntp@ietfa.amsl.com>; Thu, 27 Sep 2018 02:06:44 -0700 (PDT)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7108D130EC1 for <ntp@ietf.org>; Thu, 27 Sep 2018 02:06:44 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EA8FC356C9 for <ntp@ietf.org>; Thu, 27 Sep 2018 09:06:43 +0000 (UTC)
Received: from localhost (holly.tpb.lab.eng.brq.redhat.com [10.43.134.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 665351077D4A for <ntp@ietf.org>; Thu, 27 Sep 2018 09:06:43 +0000 (UTC)
Date: Thu, 27 Sep 2018 11:06:41 +0200
From: Miroslav Lichvar <mlichvar@redhat.com>
To: ntp@ietf.org
Message-ID: <20180927090641.GE9309@localhost>
References: <mlichvar@redhat.com> <20180926141025.GD9309@localhost> <20180927083617.41F8440605C@ip-64-139-1-69.sjc.megapath.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20180927083617.41F8440605C@ip-64-139-1-69.sjc.megapath.net>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 27 Sep 2018 09:06:44 +0000 (UTC)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/nmD3FYtcmwhtv-hjatal0Sx94vo>
Subject: Re: [Ntp] WG Call for Adoption: draft-stenn-ntp-extension-fields
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, 27 Sep 2018 09:06:47 -0000

On Thu, Sep 27, 2018 at 01:36:17AM -0700, Hal Murray wrote:
> > An NTPv4.1 packet would have the following format:
> > - 48-octet NTPv4 header
> > - 2-octet magic number (the packing EF type)
> > - 2-octet length of all data following the NTP header (the packing EF
> >   length)
> > - >24 octets of one or more EFs with no restrictions on minimal length
> 
> A possible alternative would be an EF that said no bare MAC.
>   2 byte magic number
>   2 byte length

The length of the EF would be 4 octets? That would prevent the
ambiguity in parsing (assuming the minimum length of the packet is
still 76 octets), but it wouldn't be compatible with RFC 7822, which
says the minimum length of an EF is 16 octets. Implementations that
follow it would drop such a packet for having an invalid format.

> Is this whole problem a wild goose chase?  If two systems are using MACs, they 
> have exchanged keys.  Could they also exchange a no-bare-MAC flag using the 
> same mechanism?
> 
> Why can't a system simply declare that it doesn't support bare MACs?  If so, 
> why would anybody ever send it one?

A server and client can certainly do that, but all other devices or
programs that may be processing packets between would have to follow
that and keep some state.

A switch looking for the Correction EF will not be keeping any state
for NTP and it must be sure it's really the EF and not just a random
MAC before it modifies the packet.

It would be nice if tcpdump/wireshark could reliably parse NTP packets
and display individual EFs.

-- 
Miroslav Lichvar