Re: [tsvwg] Checksums in UDP options

"C. M. Heard" <heard@pobox.com> Thu, 06 September 2018 19:01 UTC

Return-Path: <heard@pobox.com>
X-Original-To: tsvwg@ietfa.amsl.com
Delivered-To: tsvwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 53F4F130F02 for <tsvwg@ietfa.amsl.com>; Thu, 6 Sep 2018 12:01:28 -0700 (PDT)
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, 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=pobox.com; domainkeys=pass (1024-bit key) header.from=heard@pobox.com header.d=pobox.com
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 JBxQstJLpPdb for <tsvwg@ietfa.amsl.com>; Thu, 6 Sep 2018 12:01:26 -0700 (PDT)
Received: from pb-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 28D62130F73 for <tsvwg@ietf.org>; Thu, 6 Sep 2018 12:01:10 -0700 (PDT)
Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id B65123A176 for <tsvwg@ietf.org>; Thu, 6 Sep 2018 15:01:08 -0400 (EDT) (envelope-from heard@pobox.com)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=sasl; bh=tzdm1Kn5N+8gLsVZH6LyHNnrwRM=; b=oT+JGN +gXGpJ9tzCAQ5bMMggk0LZCgJ+Bxj8QDq9cVNlj/zU+zwUQhJRliuA8pT7RwbJ/3 +xyBcWPCRR8trFAEHIGWN2XZdUUKtwvLdGzM6O1nXodglDn9abzTnX/ICTRHsc93 /iWQEV7IRn4jDn1VhAET5AA30aPsgiZasVpY0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; q=dns; s=sasl; b=iKReRH4tngus+edXgTGpxaPXJIePTQlG wS2YY0gX4jI43V60iER1RIfCZ1yiMwcdrNU7JEqVgMyCDNiQRQha0UhJhHR5Qd/y c70t3YXLZL4M8nWXeRPBJzMt85eUJ85JoWkNmKpy1KuJqHr4PkbJnbWNwfyw2ze2 yaJDL9MeI2w=
Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id AF6853A174 for <tsvwg@ietf.org>; Thu, 6 Sep 2018 15:01:08 -0400 (EDT) (envelope-from heard@pobox.com)
Received: from mail-oi0-f50.google.com (unknown [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 36F7C3A171 for <tsvwg@ietf.org>; Thu, 6 Sep 2018 15:01:06 -0400 (EDT) (envelope-from heard@pobox.com)
Received: by mail-oi0-f50.google.com with SMTP id v198-v6so4915592oif.9 for <tsvwg@ietf.org>; Thu, 06 Sep 2018 12:01:06 -0700 (PDT)
X-Gm-Message-State: APzg51BrRMnBQLkBlv5e8upp5p7DUYng7d3SMnq4Qs/vJgvSzfD16kn4 bhY56wB5pUXA46QKeMsgk6UFj1hiQ3Q3UNvoYps=
X-Google-Smtp-Source: ANB0VdaH4ObZdmvl7n156oD7qz2p3SuHeN9I7+16aGeTWYlyaCj7flyrA8c1xPAxA5goWdRFz/qHLJ5vaRwyAJ3J6Ps=
X-Received: by 2002:aca:6285:: with SMTP id w127-v6mr4031437oib.120.1536260464963; Thu, 06 Sep 2018 12:01:04 -0700 (PDT)
MIME-Version: 1.0
References: <CACL_3VEh6rKDzS7rQoxsj8K+Uj9QL6CAR+mGSkB3u-xUet62pQ@mail.gmail.com> <CACL_3VGACAxiJk=6G0Nr2LMkFTMkPT-zbZo3J1+3fx4-Eqv+3Q@mail.gmail.com> <CALx6S34rzW+pnFOpe2MjcPiDGdvpz+zTHbnC8OfY3yTBU+qurw@mail.gmail.com> <CACL_3VFiJ1vCpr2SruU0dsyFbDczZteQQMG6O-tnPn3pb5ZXCA@mail.gmail.com> <CALx6S367eq-gee2a97UNdEgWQFZwjcr4gx5d01zECOm4jScPMw@mail.gmail.com> <CACL_3VHBt7gh29ZSjfFgZ9WjZx3E6wu_RbcGOg3VepYkEWD+wQ@mail.gmail.com> <CALx6S375LYkmMkS-AbbZbykQc7KJB3NVeZ9aD2=0xR4PQUQPww@mail.gmail.com>
In-Reply-To: <CALx6S375LYkmMkS-AbbZbykQc7KJB3NVeZ9aD2=0xR4PQUQPww@mail.gmail.com>
From: "C. M. Heard" <heard@pobox.com>
Date: Thu, 06 Sep 2018 12:00:52 -0700
X-Gmail-Original-Message-ID: <CACL_3VEgTQW5JpUX61ffBMxf+tdwrtmHPwiTuer67tFE8=UF7A@mail.gmail.com>
Message-ID: <CACL_3VEgTQW5JpUX61ffBMxf+tdwrtmHPwiTuer67tFE8=UF7A@mail.gmail.com>
To: Tom Herbert <tom@herbertland.com>
Cc: "C. M. Heard" <heard@pobox.com>, Joe Touch <touch@strayalpha.com>, Gorry Fairhurst <gorry@erg.abdn.ac.uk>, tsvwg <tsvwg@ietf.org>
Content-Type: text/plain; charset="UTF-8"
X-Pobox-Relay-ID: 353B49D4-B207-11E8-84F9-CC883AD79A78-06080547!pb-smtp21.pobox.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/SxSfjV4BVwv4sp3Quf0o8dA59V0>
Subject: Re: [tsvwg] Checksums in UDP options
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Transport Area Working Group <tsvwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tsvwg/>
List-Post: <mailto:tsvwg@ietf.org>
List-Help: <mailto:tsvwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Sep 2018 19:01:35 -0000

On Thu, Sep 6, 2018 at 11:30 AM Tom Herbert wrote:
> On Thu, Sep 6, 2018 at 11:03 AM, C. M. Heard wrote:
>> On Thu, Sep 6, 2018 at 10:45 AM Tom Herbert wrote:
>>> On Thu, Sep 6, 2018 at 10:23 AM, C. M. Heard wrote:
>>>> That is certainly correct, and for that reason I would agree that AE
>>>> and any other option that requires reversal of a transform on the
>>>> data must be used in conjunction with LITE, in order to prevent
>>>> misinterpretation of payload data in case of an OCS failures.
>>>>
>>>> I don't want to see this required for all UDP options, though. That
>>>> would exclude some desirable use cases. Consider the case of
>>>> DNSSEC, which is known to have issues with IPv6 fragmentation.
>>>> A client can safely include a FRAG option with offset zero,
>>>> length 12, and checksum zero in a UDP datagram sent to any server.
>>>> That FRAG option is a no-op that indicates that it is safe for the
>>>> server to return a reply using UDP fragmentation.
>>>
>>> Where's the security in that? If an attacker spoof my address and
>>> sends a FRAG option to a DNS server, then AFAICT the DNS server will
>>> think that the host with my address supports FRAG.So next time I do a
>>> DNS look up, the the server may respond with UDP fragments. If my host
>>> doesn't support UDP options, then the application gets DNS response
>>> that are gibberish. This is a perfect Denial of Service Attack.
>>
>> Your legacy host won't see gibberish if FRAG is combined with LITE as
>> we've been discussing. Rather, it will see a UDP length of zero in each of
>> the fragments, and its UDP layer will deliver no data to its application layer.
>> That's actually more innocuous that the threat that already exists today.
>>
> It's still a problem. The server may infer that receiving the FRAG
> option means that the sending host supports options. So then when the
> server starts sending options with LITE, the packets are now dropped
> at the client. The effect of DOS attack is still the same. The client
> isn't seeing responses from the server, the server thinks everything
> is okay since there's no error reports coming back to it,
>
> You might get away with this negotiation method in a request/response
> protocol like DNS if the server only responds using UDP options if it
> the client indicated support in the request.

Indeed, in the DNS case, the negotiation I describe is safe only if
the server does not retain memory of the client's ability to use FRAG
across transactions. The negotiation has to apply to exactly one
request -- which is what I was implicitly assuming. But subject to
that proviso, I fail to see any security vulnerabilities (either from a
spoofing attack or a MITM attack) that do not already exist today.

I grant that this is a special case, but I believe that it is a potentially
important special case (though the DNSOP folks may not agree --
see draft-song-atr-large-resp for an alternative approach).

Again, though, you bring up a good point: negotiating the use of
options that transform the data can introduce security vulnerabilities
unless there is some means to authenticate the remote peer.

> But note, only the
> server side can use mandatory options like FRAG, not the client in
> this case.

I think what you meant to say here was not "mandatory options"
but rather something like "options that transform the data" -- is
that correct?

Mike Heard