Re: [DNSOP] SIG(0) useful (and used?)

Shumon Huque <shuque@gmail.com> Thu, 21 June 2018 17:41 UTC

Return-Path: <shuque@gmail.com>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 104B9131101 for <dnsop@ietfa.amsl.com>; Thu, 21 Jun 2018 10:41:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 Z9FXwCz8_4RX for <dnsop@ietfa.amsl.com>; Thu, 21 Jun 2018 10:41:03 -0700 (PDT)
Received: from mail-yw0-x244.google.com (mail-yw0-x244.google.com [IPv6:2607:f8b0:4002:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 50E9E1310C6 for <dnsop@ietf.org>; Thu, 21 Jun 2018 10:41:03 -0700 (PDT)
Received: by mail-yw0-x244.google.com with SMTP id b125-v6so1462782ywe.1 for <dnsop@ietf.org>; Thu, 21 Jun 2018 10:41:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yRMj0Ww9XXsddoM8UhB2JK4BnCBE+7cG3JDTQb4pjPc=; b=G2aMc7dtLlfFwVyzwPrJFSGNXgvRhraZ62Y9N/vFAgXLT9cwhboy0uHqZXMHsKbPg/ ig+5eqjbowzTGC5eM86iqeBLc+yOiFx0Aq7n5jxN5BWjvK5TZXnWLa25yn+pxbTOwf+V a9v1SKUkKPfbkCJsAMZHUx+XN/q3m5yFcJ0dXNMoqgXMCoxYWlTinbSZaZiNImbFS34p 8SIhIq4uDHm2XDseUV60zttVuWurdM+F/Dmzlp6jy9L9JP12UJwUipgF1c2wzmdYrpi9 XN3pCEnRqRU4E2SRS09NINjVEejiuI66F6igK40IxFK3k4MXV4YzMpR3XD3pOWS08aGZ LK6Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yRMj0Ww9XXsddoM8UhB2JK4BnCBE+7cG3JDTQb4pjPc=; b=EiwHUziC/Pix8u98sOXa1olBl9mO1vdoKqQQ0V5NfrPM6bmC+n4UWnDtd/Hka+Jv8e 4+PZ1oWsaHuQjtaFmIuZg5Lux0xyeONOL7i98/hhluTCtXOlat4hyNEDxF+dUwouFvLz i0W2/jSez0uNwvpq7cIE6qEOuk0ZlOF1slXFQZ3xAC3jgNoeFfbBeiCAJMhFl6nriXBK JwgqNPMCeF9WsAynHjPLly5m2jj0Kf6Mlaatuwol7VdTmqM+6bMhjmqqqDyd1Sj6lh3M exs4oLWimkzjec3QfAos46uLqzciQ2NDMFCV0O44mZvfqcGYWaQ6Aw4GuWep+1Fu3D1R /Vjg==
X-Gm-Message-State: APt69E1GlFEl9TDiOGRX2BfeHgsD2ClsZ02YeT7SBubByC+KY9U0nWW4 WlctdadbhFcjpM7jhUsND+xAPeObcjWxTxLr7Yo=
X-Google-Smtp-Source: ADUXVKLIKerdNQ8El0KoFt8CumdtyMEmu4kum6qXgiH6A6xA3v2Qmd7pTKjRTnyT2xjeNpf5vI7urQy8jNmwb1/U+J8=
X-Received: by 2002:a81:7a08:: with SMTP id v8-v6mr12846424ywc.275.1529602862280; Thu, 21 Jun 2018 10:41:02 -0700 (PDT)
MIME-Version: 1.0
References: <6C8533C2-6510-4A0E-A7EA-50EB83E43A7D@isc.org> <6B764CF2-FC1F-4B55-B4A3-F49729847DCF@bangj.com> <b85eb6ec-8d4c-221a-35ac-4c4efb9bd5c4@nic.cz> <56702D15-B557-4A9E-BD18-5379105CCB30@bangj.com>
In-Reply-To: <56702D15-B557-4A9E-BD18-5379105CCB30@bangj.com>
From: Shumon Huque <shuque@gmail.com>
Date: Thu, 21 Jun 2018 13:40:50 -0400
Message-ID: <CAHPuVdWnm8nCHD4DbC=LnPoJgch7ZO7NuitHECnMxsrVLZExqA@mail.gmail.com>
To: pusateri@bangj.com
Cc: vladimir.cunat+ietf@nic.cz, "dnsop@ietf.org WG" <dnsop@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000040f3d9056f2a6b6c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/oTOaj4Sf7XiSTLh7edG37oz25Y4>
Subject: Re: [DNSOP] SIG(0) useful (and used?)
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jun 2018 17:41:19 -0000

On Thu, Jun 21, 2018 at 8:05 AM Tom Pusateri <pusateri@bangj.com> wrote:

> On Jun 21, 2018, at 12:19 AM, Vladimír Čunát <vladimir.cunat+ietf@nic.cz>
> wrote:
>
> On 06/20/2018 04:59 PM, Tom Pusateri wrote:
>
> DNSSEC will tell you the answer you get is correct but it could be a > to
> a different question or be incomplete.
>
> Can you elaborate on that point.  I believe in signed zones you are able
> to verify almost everything, in particular existence of the queried-for
> RRset and its exact value, except for details like current TTL.
>
> --Vladimir
>
>
> I’ve been thinking about the case when you are given a DNS recursive
> resolver over DHCP and you don’t necessarily trust it.
>

SIG(0) can't really protect you from an untrustworthy resolver. It can
ensure that the question you sent and the answer you got back from the
recursive server was not tampered with in-flight. But it can't detect
whether the recursive server modified any data in its response before it
signed it with SIG(0). If the response contained DNSSEC signed data and the
stub was validating, then those pieces of the response could be
authenticated. But not anything in the header, question etc - all of that
could have been modified by the recursive server without detection.


> If you send a query with the DO bit set to a recursive resolver for the A
> record for foo.example.com and the recursive resolver modifies this query
> to foo.exampl.com, you can get back a validated DNSSEC response with the
> A record answer, RRSIG, NSEC(3) records all for the wrong question. The
> resolver code in the OS or application would get back the matching DNS
> header identifier and if it lazily just grabbed the A record answer without
> comparing the RR name, it could be misled. You can detect this without
> SIG(0) so maybe that was a bad example. But if you always sent a SIG(0)
> signed question and got a signed answer, you could detect this and possibly
> other future attacks and drop it before even parsing the answers.
>

Most competent resolvers will check that the response that they got back
was for the question they asked. So I don't think they would "lazily just
grab the A record answer without comparing the RR name".

I don't think SIG(0) really helps much here. The response signature has to
include the entire query message, but the actual response can contain
anything the recursive server puts in there.


> In the case of missing answers, I was thinking that if there were multiple
> A records in the response and some were filtered, you could not detect this
> without a SIG(0) signed response from the authoritative server. This would
> be important if one server was compromised and the recursive resolver
> filtered the response to exclude the other A records pointing to servers
> that weren’t compromised directing you to the compromised server.
>

DNSSEC is really the solution to this problem. DNSSEC signatures cover the
entire RRset, so authoritative (or recursive) servers cannot strip away
some of the RRs without detection by a downstream validator.

Shumon.