Re: [ntpwg] The next step of draft-ietf-ntp-checksum-trailer

kristof.teichel@ptb.de Tue, 08 March 2016 12:29 UTC

Return-Path: <ntpwg-bounces+ntp-archives-ahfae6za=lists.ietf.org@lists.ntp.org>
X-Original-To: ietfarch-ntp-archives-ahFae6za@ietfa.amsl.com
Delivered-To: ietfarch-ntp-archives-ahFae6za@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E7E3112D694 for <ietfarch-ntp-archives-ahFae6za@ietfa.amsl.com>; Tue, 8 Mar 2016 04:29:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.899
X-Spam-Level:
X-Spam-Status: No, score=-6.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([127.0.0.1]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DfJdI5wFWa42 for <ietfarch-ntp-archives-ahFae6za@ietfa.amsl.com>; Tue, 8 Mar 2016 04:29:42 -0800 (PST)
Received: from lists.ntp.org (lists.ntp.org [IPv6:2001:4f8:fff7:1::7]) by ietfa.amsl.com (Postfix) with ESMTP id 607BD12D684 for <ntp-archives-ahFae6za@lists.ietf.org>; Tue, 8 Mar 2016 04:29:42 -0800 (PST)
Received: from lists.ntp.org (lists.ntp.org [149.20.68.7]) by lists.ntp.org (Postfix) with ESMTP id 285AC86DB69 for <ntp-archives-ahFae6za@lists.ietf.org>; Tue, 8 Mar 2016 12:29:42 +0000 (UTC)
X-Original-To: ntpwg@lists.ntp.org
Delivered-To: ntpwg@lists.ntp.org
Received: from mail1.ntp.org (mail1.ntp.org [IPv6:2001:4f8:fff7:1::5]) by lists.ntp.org (Postfix) with ESMTP id 88AC886DB12 for <ntpwg@lists.ntp.org>; Tue, 8 Mar 2016 11:30:00 +0000 (UTC)
Received: from mx1.bs.ptb.de ([192.53.103.120]) by mail1.ntp.org with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from <kristof.teichel@ptb.de>) id 1adFpi-000H58-TR for ntpwg@lists.ntp.org; Tue, 08 Mar 2016 11:29:59 +0000
Received: from smtp-hub.bs.ptb.de (smtpint01.bs.ptb.de [141.25.87.32]) by mx1.bs.ptb.de with ESMTP id u28BTjIS008048-u28BTjIU008048 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=FAIL) for <ntpwg@lists.ntp.org>; Tue, 8 Mar 2016 12:29:45 +0100
Received: from rose.bs.ptb.de (rose.bs.ptb.de [141.25.85.201]) by smtp-hub.bs.ptb.de (Postfix) with ESMTP id 10A4B357BF for <ntpwg@lists.ntp.org>; Tue, 8 Mar 2016 12:29:45 +0100 (CET)
In-Reply-To: <E1ad9m6-000FC3-9g@stenn.ntp.org>
References: <4569da98236441699fb26aebb71f90a7@IL-EXCH01.marvell.com> <E1acVNL-000CK8-RW@stenn.ntp.org> <20160307093202.GJ20222@localhost> <E1acsHr-000Dmy-Bf@stenn.ntp.org> <20160307112840.GK20222@localhost> <E1acuOC-000Dwm-SV@stenn.ntp.org> <20160307131625.GA3209@localhost> <E1ad3uf-000EcV-1I@stenn.ntp.org> <56DE4A34.1070106@ntp.org> <E1ad9m6-000FC3-9g@stenn.ntp.org>
To: ntpwg@lists.ntp.org
MIME-Version: 1.0
Message-ID: <OF10490EAF.08B1166E-ONC1257F70.003B7EA4-C1257F70.003F25A6@ptb.de>
From: kristof.teichel@ptb.de
Date: Tue, 08 Mar 2016 12:29:43 +0100
X-SA-Exim-Connect-IP: 192.53.103.120
X-SA-Exim-Rcpt-To: ntpwg@lists.ntp.org
X-SA-Exim-Mail-From: kristof.teichel@ptb.de
X-SA-Exim-Version: 4.2
X-SA-Exim-Scanned: Yes (on mail1.ntp.org)
Subject: Re: [ntpwg] The next step of draft-ietf-ntp-checksum-trailer
X-BeenThere: ntpwg@lists.ntp.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: IETF Working Group for Network Time Protocol <ntpwg.lists.ntp.org>
List-Unsubscribe: <http://lists.ntp.org/options/ntpwg>, <mailto:ntpwg-request@lists.ntp.org?subject=unsubscribe>
List-Archive: <http://lists.ntp.org/pipermail/ntpwg/>
List-Post: <mailto:ntpwg@lists.ntp.org>
List-Help: <mailto:ntpwg-request@lists.ntp.org?subject=help>
List-Subscribe: <http://lists.ntp.org/listinfo/ntpwg>, <mailto:ntpwg-request@lists.ntp.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============2579820806178674446=="
Errors-To: ntpwg-bounces+ntp-archives-ahfae6za=lists.ietf.org@lists.ntp.org
Sender: ntpwg <ntpwg-bounces+ntp-archives-ahfae6za=lists.ietf.org@lists.ntp.org>

> > I recall that there were conflicting statements in RFC5905 (NTPv4) and
> > RFC5906 (autokey) when we were doing the extension field draft and 
that
> > was one of the reasons that we clarified that the MAC was optional in
> > that draft. Section 7.3 of RFC5905 indicates that the MAC is optional
> > but elsewhere it seemed to be required. The EF draft makes it clear 
that
> > it is optional though any specific extension field may require it. The
> > draft was meant to remove the ambiguities.
> 
> Autokey has ALWAYS required MAC authentication.

There is a distinction between "an Autokey EF always requires a MAC in the 
packet" (which makes sense) and "any EF always requires a MAC in the 
packet" (which does not make much sense).

However, the latter is what the language of RFC5905 implies:
> 7.5.  NTP Extension Field Format
>
>   In NTPv4, one or more extension fields can be inserted after the
>   header and before the MAC, which is always present when an extension
>   field is present.

This language was absolutely worth re-considering.



> >>>> We're getting ready to publish a "MAC in an Extension Field", and
> >>>> arguably this is how it should have been originally done.  So in 
keeping
> >>>> with the above logic, there are 2 pieces of information we want to 
see
> >>>> for an extension field.  One is "SHOULD or MAY have MAC protection 
after
> >>>> this field," and the other is "This extension field provides MAC
> >>>> protection."
> >>>
> >>> What will the receiver of this information do with it?
> >> 
> >> Whatever it wants.  This goes to giving the client basic information
> >> that is useful in deciding what to do in case the client  gets EFs it
> >> doesn't understand.
> >> 
> > 
> > If it gets EF's it doesn't understand it makes no difference whether 
or
> > not it indicates that it requires a MAC. You can't do anything with 
it.
> 
> That's not true.
> 
> If the EF says "I am a MAC" and the client doesn't
> understand it, then the client can look for an old-style MAC.

Shouldn't the client always scan for an old-style MAC?

> 
> If the unknown EF says "I don't NEED a MAC" then context can provide
> information as to whether or not it makes a difference.
> 
> I think the better questiion is why do you want to categoricaly deny
> this information to the client?

For a long time, my opinion on this topic was: "I don't see how the 
information [Do I require a MAC: Yes/No] and [Do I contain a MAC: Yes/No] 
is useful, but I also don't see how it would hurt."

This has changed after some more consideration: I now believe it would be 
dangerous to include a bit [Do I require a MAC: Yes/No]. An attacker would 
have the option of moving extension fields to the end of the packet (e.g. 
after a MAC-containing EF) and to be able to flag them as [Do I require a 
MAC: No]. If the receiver actually considered this in their processing of 
the packet, bad things could happen (in particular, this might lead to 
cases where false security is created).

> > If it uses an extension
> > field that requires a MAC, not providing it needs to cause the packet
> > to be dropped by the receiving server.

Yes, I would add to this: "If [a packet] uses an extension field that [as 
per the receiver's own policy] requires a MAC, then not providing [said 
MAC] needs to cause the packet to be dropped by the receiver [, even if 
the extension field claims in its field type flag that it does not need to 
be secured]."

Overall, I would prefer a requirement that the client MUST NOT change 
their behavior towards a packet because of the proposed new bits, 
especially those in unprotected EFs. Which makes me think that introducing 
those bits is maybe not a good idea after all.


ADDENDUM: I don't think it is a great idea, but IF you really want to 
communicate information about what contents of a packet are allowed to be 
included unsecured in the case where at least parts of the packet are 
secured, then the list of permitted unsecured content should be secured 
itself. Read: there would be an EF before the MAC, and the payload of that 
EF would contain a list of EF field type values, each representing an 
unsecured EF that is to be appended after the MAC (this assumes that the 
sender knows the number and type of unsecured EFs that it later wishes to 
append).
My proposal would solve the problem posed in the following:
 
> My alternative to Tal's proposal *allows* a "MAC as an EF", and the
> checksum complement that comes after this has the bit that says "I do
> not need a MAC".  So what is protected is the base NTP packet, any other
> EFs, and the "MAC as and EF".  The only other subsequent data in the
> packet is the "precision transmit adjustmenet and the checksum
> complement".
> 
> This last EF is *not* protected, and that's OK.
_______________________________________________
ntpwg mailing list
ntpwg@lists.ntp.org
http://lists.ntp.org/listinfo/ntpwg