[Ntp] Antw: Re: New I-D: NTP Port Randomization (draft-gont-ntp-port-randomization-00.txt)

"Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de> Wed, 24 April 2019 06:12 UTC

Return-Path: <Ulrich.Windl@rz.uni-regensburg.de>
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 3A0D5120111 for <ntp@ietfa.amsl.com>; Tue, 23 Apr 2019 23:12:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=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 LtAffILil9Jr for <ntp@ietfa.amsl.com>; Tue, 23 Apr 2019 23:12:47 -0700 (PDT)
Received: from mx0.uni-regensburg.de (mx0.uni-regensburg.de [194.94.157.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DB30B12002E for <ntp@ietf.org>; Tue, 23 Apr 2019 23:12:46 -0700 (PDT)
Received: from mx0.uni-regensburg.de (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 04015600073B for <ntp@ietf.org>; Wed, 24 Apr 2019 08:12:43 +0200 (CEST)
Received: from mx1.uni-regensburg.de (mx1.uni-regensburg.de [IPv6:2001:638:a05:137:165:0:3:bdf7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.uni-regensburg.de", Issuer "Uni Regensburg CA - G01" (not verified)) by mx0.uni-regensburg.de (Postfix) with ESMTPS id 0224E6000732 for <ntp@ietf.org>; Wed, 24 Apr 2019 08:12:43 +0200 (CEST)
Received: from mx1.uni-regensburg.de (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id EB0B66000067 for <ntp@ietf.org>; Wed, 24 Apr 2019 08:12:42 +0200 (CEST)
Received: from gwsmtp.uni-regensburg.de (gwsmtp1.uni-regensburg.de [132.199.5.51]) by mx1.uni-regensburg.de (Postfix) with ESMTP id D70826000065 for <ntp@ietf.org>; Wed, 24 Apr 2019 08:12:41 +0200 (CEST)
Received: from uni-regensburg-smtp1-MTA by gwsmtp.uni-regensburg.de with Novell_GroupWise; Wed, 24 Apr 2019 08:12:41 +0200
Message-Id: <5CBFFE58020000A100030E70@gwsmtp.uni-regensburg.de>
X-Mailer: Novell GroupWise Internet Agent 18.1.1
Date: Wed, 24 Apr 2019 08:12:40 +0200
From: "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de>
To: <mlichvar@redhat.com>,"Fernando Gont" <fgont@si6networks.com>
Cc: "ntp@ietf.org" <ntp@ietf.org>
References: <155544937440.24990.5297599214551671091.idtracker@ietfa.amsl.com> <d0be2bea-0e57-022f-16f1-4e682dcc66ad@si6networks.com> <20190418123648.GF5984@localhost> <ceea9343-496f-2842-8255-158b515106b6@si6networks.com> <20190423084853.GB5188@localhost> <890da574-a283-9ccc-28fc-19d500920d36@si6networks.com>
In-Reply-To: <890da574-a283-9ccc-28fc-19d500920d36@si6networks.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
X-PMX-local: 5CBFFE5B_29249_116_1
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/PTzPkn6aoI6yaMn86UKOMhoJO88>
Subject: [Ntp] Antw: Re: New I-D: NTP Port Randomization (draft-gont-ntp-port-randomization-00.txt)
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: Wed, 24 Apr 2019 06:12:49 -0000

>>> Fernando Gont <fgont@si6networks.com> schrieb am 24.04.2019 um 01:17 in
Nachricht <890da574-a283-9ccc-28fc-19d500920d36@si6networks.com>om>:
> On 23/4/19 10:48, Miroslav Lichvar wrote:
>> On Fri, Apr 19, 2019 at 12:56:04AM +0200, Fernando Gont wrote:
>>> On 18/4/19 14:36, Miroslav Lichvar wrote:
>>>> The source port in client mode packets can be random and it can also
>>>> change with each request, which might be recommended in the document.
>>>> Most NTP clients do that.
>>>
>>> FWIW, I'm running ntpd 4.2.8p11@1.3728‑o on Ubuntu, and all packets use
>>> src port 123.
>> 
>> Yes, ntpd and ntpdate (without ‑q or ‑d) seem to be in the minority of
>> clients using source port 123.
> 
> Any clues whether in other cases they explicitly randomize the source
> port, or rely on the kernel doing port randomization?

Basically I think there are only two cases:
1) You care and pick a port number like 123
2) You don't care and use 0 as port number, causing the OS to pick one for
you

I see no point of explicitly selecting a random post, specifically when you
can't be sure whether another process has picked that already, too.

[...]

Regards,
Ulrich Windl