Re: [secdir] [Last-Call] [DNSOP] Secdir last call review of draft-ietf-dnsop-server-cookies-04

Stephen Farrell <stephen.farrell@cs.tcd.ie> Wed, 02 December 2020 22:32 UTC

Return-Path: <stephen.farrell@cs.tcd.ie>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 26AD83A14F3; Wed, 2 Dec 2020 14:32:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cs.tcd.ie
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 KZYdR1mn8Yc4; Wed, 2 Dec 2020 14:32:04 -0800 (PST)
Received: from mercury.scss.tcd.ie (mercury.scss.tcd.ie [134.226.56.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 24E253A14D8; Wed, 2 Dec 2020 14:32:02 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by mercury.scss.tcd.ie (Postfix) with ESMTP id 05E75BE2C; Wed, 2 Dec 2020 22:32:01 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at scss.tcd.ie
Received: from mercury.scss.tcd.ie ([127.0.0.1]) by localhost (mercury.scss.tcd.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rEdTZgVcGk7H; Wed, 2 Dec 2020 22:31:57 +0000 (GMT)
Received: from [10.244.2.119] (95-45-153-252-dynamic.agg2.phb.bdt-fng.eircom.net [95.45.153.252]) by mercury.scss.tcd.ie (Postfix) with ESMTPSA id 8EB6FBE24; Wed, 2 Dec 2020 22:31:57 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cs.tcd.ie; s=mail; t=1606948317; bh=BQng0Tk/GXYzKDM5RhU1WM0Yxt9tqzDDcMia26jpgG4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=qYjD3D4wYfrfY1d0piHtSMfTsL2wDNUqkZDc3IyAKEmKTRdukprCbBut1UOaCjt5E qCK1wHoWBazh+4O4m4su3jEs2laTqgWNqqixNx1M1yYYZKcf+IAOcipB7qGclE5Wg7 hbg4WxVBOEZr1+m6OtdhyBrtiDWug97r3l6CXtu0=
To: Willem Toorop <willem@nlnetlabs.nl>, Ondřej Surý <ondrej@isc.org>
Cc: last-call@ietf.org, draft-ietf-dnsop-server-cookies.all@ietf.org, dnsop@ietf.org, secdir@ietf.org
References: <160693121881.9413.5642470305677631145@ietfa.amsl.com> <17AFD6F5-11DA-41BC-8C37-E1893648041D@isc.org> <75c266ba-573a-29e3-621d-aea9b27f195f@cs.tcd.ie> <b23d3f2b-4b4f-f70c-ff53-cbd2c229a887@nlnetlabs.nl> <d263c879-6c85-fbc3-3484-02402b1c52aa@cs.tcd.ie> <9a15fe4b-7850-3558-78d8-7ad7f90fd97d@nlnetlabs.nl>
From: Stephen Farrell <stephen.farrell@cs.tcd.ie>
Message-ID: <86e60c0a-58c6-0ef8-d348-ef1f6f72fab9@cs.tcd.ie>
Date: Wed, 02 Dec 2020 22:31:56 +0000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0
MIME-Version: 1.0
In-Reply-To: <9a15fe4b-7850-3558-78d8-7ad7f90fd97d@nlnetlabs.nl>
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="ahy2N9KkI58fC8LJZ2k5AT08dNnUtZp5I"
Archived-At: <https://mailarchive.ietf.org/arch/msg/secdir/kQP7aYiFM5EsqO230piOjiCZZH4>
Subject: Re: [secdir] [Last-Call] [DNSOP] Secdir last call review of draft-ietf-dnsop-server-cookies-04
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Security Area Directorate <secdir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdir>, <mailto:secdir-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/secdir/>
List-Post: <mailto:secdir@ietf.org>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 02 Dec 2020 22:32:06 -0000

Hiya,

On 02/12/2020 22:07, Willem Toorop wrote:
> 
> 
> Op 02-12-2020 om 22:49 schreef Stephen Farrell:
>>
>> Hiya,
>>
>> On 02/12/2020 21:38, Willem Toorop wrote:
>>> Op 02-12-2020 om 21:37 schreef Stephen Farrell:
>>>
>>> <snip>
>>>
>>>>> ad 2) we need a value that’s synchronized well enough and monotonic.
>>>>> I honestly don’t see any value in using 64-bit value here. Using
>>>>> unixtime has a value in itself, it’s a well-known and there’s a
>>>>> little room for any implementer to make a mistake in an
>>>>> implementation. The interoperability is more important than the
>>>>> actual value of the counter. It’s write only counter, nobody is going
>>>>> to interpret it after it has been generated, and it’s wide enough to
>>>>> prevent brute forcing.
>>>>
>>>> So what happens after 2038? That's really not v. far in the
>>>> future any more.
>>>
>>> The draft states that `All comparisons involving these fields MUST
>>> use "Serial number arithmetic", as defined in [RFC1982]'. So it can not
>>> be used to compare differences larger than 68 years, but comparisons of
>>> cookie timestamps are more in the "hours" order of magnitude.
>>
>> Sorry for being dim, but is clear what value to put
>> in those 4 octets in say 2039 such that different
>> implementations will do the right thing
> Well the text does specify an "32-bit unsigned number of seconds elapsed
> since 1 January 1970 00:00:00 UTC", so because of the "unsigned" the
> wrap to 0 is only in 2106, not 2038.

Ah. I missed that "unsigned." (Does that mean implementers
might also?)

> But even then, in 2106, it should not be a problem to check the age of a
> cookie because of the rfc1982 comparison (which takes care of the wrap)
> and the fact that Server Cookies will not be older than hours (and not
> years).

So the buggy case would be where a server re-constructs
the input to the hash after some kind of round-trip of
the octets (to e.g. struct tm or something and then back
to time_t and to network byte order) at which point you could
I think get failures depending on who implemented what
incorrectly. That kind of thing has been seen before (even
if it seems a bit mad;-)

FWIW, I'd say it's worth a few more words to try reduce
the probability of such failures happening, e.g. maybe
just highlighting the "unsigned/2106" point you made
above would be enough. But, if the WG don't want to do
that, that's also fine by me.

Cheers,
S.


> 
> Cheers,
> -- Willem
> 
>> I did glance
>> at rfc1982, so there may be very far-sighted text
>> in there that I missed:-) And it may even be fine
>> for this purpose if different servers differ by a
>> second or so at that point, but even if so, it may
>> be a bad plan to leave that unspecified in case
>> other timestamps use the same code.
>>
>> Cheers,
>> S.
>>
>>>
>>> Cheers,
>>> -- Willem
>>>
>>>>
>>>> Cheers,
>>>> S.
>>>>
>>>>>
>>>>> Cheers, Ondřej -- Ondřej Surý — ISC (He/Him)
>>>>>
>>>>>> On 2. 12. 2020, at 18:47, Stephen Farrell via Datatracker
>>>>>> <noreply@ietf.org> wrote:
>>>>>>
>>>>>> Reviewer: Stephen Farrell Review result: Has Issues
>>>>>>
>>>>>> I see two issues here worth checking:
>>>>>>
>>>>>> 1. I don't recall SipHash being used as a MAC in any IETF standard
>>>>>> before. We normally use HMAC, even if truncated. Why make this
>>>>>> change and was that checked with e.g. CFRG? (And the URL given in
>>>>>> the reference gets me a 404.)
>>>>>>
>>>>>> 2. Is it really a good idea to use a 32 bit seconds since
>>>>>> 1970-01-01 in 2020? I'd have thought that e.g. a timestamp in hours
>>>>>> since then or seconds since some date in 2020 would be better.
>>>>>>
>>>>>> Here's a couple of nits too: - section 1: what's a "strong
>>>>>> cookie"? - "gallimaufry" - cute! but not sure it'll help readers to
>>>>>> learn that word.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________ DNSOP mailing list
>>>>> DNSOP@ietf.org https://www.ietf.org/mailman/listinfo/dnsop
>>>>>
>>>>
>>>> _______________________________________________
>>>> DNSOP mailing list
>>>> DNSOP@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/dnsop
>>>>
>>>
>>> _______________________________________________
>>> DNSOP mailing list
>>> DNSOP@ietf.org
>>> https://www.ietf.org/mailman/listinfo/dnsop
>>>
>