Re: [Ntp] [EXT] Re: NTPv5 KISS code support

Danny Mayer <mayer@pdmconsulting.net> Wed, 22 November 2023 15:26 UTC

Return-Path: <mayer@pdmconsulting.net>
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 2FA76C14CE30 for <ntp@ietfa.amsl.com>; Wed, 22 Nov 2023 07:26:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YeotNA3sVBkS for <ntp@ietfa.amsl.com>; Wed, 22 Nov 2023 07:26:42 -0800 (PST)
Received: from chessie.everett.org (chessie.fmt1.pfcs.com [66.220.13.234]) by ietfa.amsl.com (Postfix) with ESMTP id 144C1C14E515 for <ntp@ietf.org>; Wed, 22 Nov 2023 07:26:41 -0800 (PST)
Received: from [IPV6:2600:4040:57a0:5000:8085:dafc:198b:a4c0] (unknown [IPv6:2600:4040:57a0:5000:8085:dafc:198b:a4c0]) (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 chessie.everett.org (Postfix) with ESMTPSA id 4Sb4pn2f6jzMR3S; Wed, 22 Nov 2023 15:26:41 +0000 (UTC)
Message-ID: <a093cea9-191b-44d5-ad6f-b14a10c90893@pdmconsulting.net>
Date: Wed, 22 Nov 2023 10:26:40 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: Hal Murray <halmurray+ietf@sonic.net>, NTP WG <ntp@ietf.org>
References: <20231122033921.D637B28C20C@107-137-68-211.lightspeed.sntcca.sbcglobal.net>
From: Danny Mayer <mayer@pdmconsulting.net>
Autocrypt: addr=mayer@pdmconsulting.net; keydata= xsBNBFuvm5wBCAC9DxF2vFcA4FES0ajbbUz/YPUHec/4/4QaZnXjEBNUCcYqRKhDsGrabF7b 1IVW2VV00dKDk9Hxk2cZ0OtDAoTFVozlhMPQbbQHW5FCUCmvmOUfTcqjnYSXjt3UULLvKoZh PwteuoZEBVno+SkiMYbkCVUyEvjgcQyMAOdFdJbKS3lKqU7t8OxIgsH5lHdddMcOGDvYYREs Rhd3tTwFwssvg91I2Xh+b7x7EPoIqptcopLc2oGeX3ccuXZuqKqRNTViODIBT79bxenl38y4 +uSgYoZSGNCXJe83W7JMXf5TmeTbzaxoJsw93kXH71y2DbNqIt2AMOGDJIdWVxf7aHvBABEB AAHNJURhbm55IE1heWVyIDxtYXllckBwZG1jb25zdWx0aW5nLm5ldD7CwJQEEwEIAD4CGwMF CwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQRgb1gA0HP+S+QJ2mb9HkdxwIhMygUCYdyOwwUJ C22tJwAKCRD9HkdxwIhMytnkB/9J5WuA9vlZ1sKbzyyCUnwTKnpFbYujcL0aML6vpaUqScI5 ieVFrJtsu1VexJrsl1k2fxGoFaCr8ox1Kdw6dSgRgMMhXCpQI1xgnAjVIwVZs0Bdn3imWEUG M/Sc6Wci0B/fw/XO/UydgjAOdq6PHP0hlT9cjyupNNSgIBVDpVRY0kVhVuDp/UcFvKoqcthK 6h748nPwdBbL6HCfdgoQzKEjD27eba2pTPF9ToJcggOkNU33jyF4fBSsOl93YZuoc7dgsW+g fMIpVHV812A9yHoROeySM4kIFwWhUTGfyt+nBR2SVuvzqI+q7dgaVgnUkm+iq4WqTz2r/xCq cVBf5jftzsBNBFuvm5wBCACfJdNthq1KqkrY55kHGoyYPenUWRbaMbSiTanMZ+U67W+4eErS gK4OeRLuWvEj5hrd2oq/Fowj6qIZZ5lUm3uTOIQQLYchZSMemwAhkVdvu4gFTDldUnxgphrY DMmOc2oxKl+FHmJUYCvBEIzLJkPhGHApHMgW5y7/lHZL8QE55+aZINC4LgqOWhx7WzjpkH9e bA+TnoqKJdPXWKtqD8EU9m/LxDpXMulMArEZ/dlYfhfakJoj6iDC9yTIxfAkN4k5U5Y7MmeS lNPEobdz+Y/UvoKTXWOr88W+dSce0toSwfuA2R5Ji0DzIQ7VJSxRHoMhGZkt3z3otlhqSutv 6gCDABEBAAHCwJAEGAEIACYCGwwWIQRgb1gA0HP+S+QJ2mb9HkdxwIhMygUCYdyOxAUJC22t JwAeCRD9HkdxwIhMygkQ/R5HccCITMoJEP0eR3HAiEzKxKMH/3Gsrl+Vkn6GzJCp4jJ+hQh2 g3AS+quSBIEAWH7RNEPj9oP6jw86yCUR7OnKs+WSLK7xkshzlzpFgfX8opvH8+ipXlh6tN5+ g7zUk3wayXSXsea2ESqQ9KiEC9ja9G87vBSULQ/+5ffjFfy2rMHF1hHHmulRX79CgF8Q5Os1 azIry6nvetO9l1v6L2okD5oqUI1CobkeLMYPLKE5o3aMRwNI1z+5/WXcPKNrFqDQ9idVdmW0 +AF1nsHbs1gArYIFmI4YHXSDpB4ti8WjZU8yXUtN0eN++VAvqyjfT1FyR3fdNgFpGXp6+mwi swgmoEjf/GNcN3zs0X590bfaYPJfv/0=
In-Reply-To: <20231122033921.D637B28C20C@107-137-68-211.lightspeed.sntcca.sbcglobal.net>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/9rd9jykruxz1lmw5DVuCOTt_4tI>
Subject: Re: [Ntp] [EXT] Re: NTPv5 KISS code support
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Network Time Protocol <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, 22 Nov 2023 15:26:44 -0000

On 11/21/23 10:39 PM, Hal Murray wrote:
> Me:
>> In the Cryptographic failure case, it might be reasonable to send back a
>> non-authenticated message saying why the crypto didn't work.  The catch is
>> that the receiver would have to not take any action since it might be forged,
>> but it could be logged for debugging.
> Danny Mayer said:
>> Absolutely not. Providing any information at all gives an attacker insights
>> as to what they did wrong.
> Salz, Rich said:
>> In general, you want to avoid giving any details about what went wrong if the
>> cryptography fails, because that is information that an attacker can use.
> Miroslav Lichvar said:
>> Hm, I forgot about this one. I agree it's nice to be able to restart NTS-KE
>> quickly instead of waiting for 8 or how many missing responses when the
>> client's key is no longer valid.
> RFC 8915 says:
>> If the server is unable to validate the cookie or authenticate the request,
>> it SHOULD respond with a Kiss-o'-Death (KoD) packet (see Section 7.4 of RFC
>> 5905 [RFC5905]) with kiss code "NTSN", meaning "NTS NAK" (NTS
>> negative-acknowledgment). It MUST NOT include any NTS Cookie or NTS
>> Authenticator and Encrypted Extension Fields extension fields.
> This seems like an interesting topic.  I don't care what the answer is.
>
> Should we set a good example for security by not returning ANYTHING when the
> NTS crypto doesn't work?  This would require patching RFC 8915.  There is no
> mention of KoD in the security consideration section of 8915.  There is text
> in the body about checking the UID in unauthenticated packets.
RFC 5905 Section 9.2 defines a crypto-NAK in the case of a failure. Not 
sending anything has historically been shown to cause more traffic. The 
crypto-NAK does not send any useful information and that section 
instructs the client to discard the packet after inspection. The RFC 
says that the header data should be normal but in this case I would 
suggest it should actually return the same as KISS codes where the 
server receive and transmit timestamps are considered unreliable and 
should be discarded. In the Reference NTP those timestamps are the same 
as the transmit timestamp and have the interesting property of telling 
the client that their clock is off by half the round-trip delay which 
would push their clock off by that amount if they ignore the KISS code.
>
> Is there a tradeoff between helping the good guys and helping the bad guys?
No, you provide no information at all. Good guys will have access to the 
logs and be able to deal with issues.
>
> I'd be happy if we dropped KoD totally.  It will simplify documenation (and
> code) and avoid discussions like this one.  KoDs can be forged, so any
> discussion has to consider DoS-ing and that gets complicated.
KISS codes are useful and allows the server to tell the client to back 
off or go away.
>
> Does anybody have any data on KoDs?  Do they do any good?  I'd expect that
> most of the software that receives them won't know how to process them.
>
I suspect Judah might have some information on that.

Danny