Re: [pkix] Please clarify when and where wildcards should be matched in PKIX certificates

"Ryan Sleevi" <ryan-pkix@sleevi.com> Fri, 05 June 2015 21:24 UTC

Return-Path: <ryan-pkix@sleevi.com>
X-Original-To: pkix@ietfa.amsl.com
Delivered-To: pkix@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 329E71A039A for <pkix@ietfa.amsl.com>; Fri, 5 Jun 2015 14:24:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.233
X-Spam-Level:
X-Spam-Status: No, score=0.233 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no
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 AJbH0wpBAeG6 for <pkix@ietfa.amsl.com>; Fri, 5 Jun 2015 14:24:29 -0700 (PDT)
Received: from homiemail-a25.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id 1CC721A0121 for <pkix@ietf.org>; Fri, 5 Jun 2015 14:24:29 -0700 (PDT)
Received: from homiemail-a25.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a25.g.dreamhost.com (Postfix) with ESMTP id BF161678063; Fri, 5 Jun 2015 14:24:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sleevi.com; h=message-id :in-reply-to:references:date:subject:from:to:cc:reply-to :mime-version:content-type:content-transfer-encoding; s= sleevi.com; bh=R9OMkNAx9zZxAvS56HlhxFKHeHs=; b=NdQ4SaNXPCnSskj/n RrChTDM+jFE3F2aWTb3j5SvAbG9XXa57ZRx41O6SJPpmaZUsINI0kexmvbiFJf0M 6+QjU7WD7fy+2zuEj0cizjOwxjJEqP9cmMGPH+tlid8WNIgVuCihPgdMcx0aylnw p6VkdUFbdyC/+hrk+84EbHPvYI=
Received: from webmail.dreamhost.com (caiajhbihbdd.dreamhost.com [208.97.187.133]) (Authenticated sender: ryan@sleevi.com) by homiemail-a25.g.dreamhost.com (Postfix) with ESMTPA id 7DA00678057; Fri, 5 Jun 2015 14:24:28 -0700 (PDT)
Received: from 216.239.45.71 (SquirrelMail authenticated user ryan@sleevi.com) by webmail.dreamhost.com with HTTP; Fri, 5 Jun 2015 14:24:27 -0700
Message-ID: <4634fd36f253ee5d1b35966e52088a0b.squirrel@webmail.dreamhost.com>
In-Reply-To: <CAH8yC8kfwYqDKrkgj1PwY3YdG4aa+aD8kM=DRvSVKsRsfQryCA@mail.gmail.com>
References: <CAH8yC8=_PypmYYW_0XPUS0xFB6vP4N1=RTmzCjdwVnR-05H=hw@mail.gmail.com> <CAH8yC8kLgbXYZb_-AY3er5EagG5XmUDaQhL7ynRwd+GL2anJeQ@mail.gmail.com> <CAH=tA5tT4VwWQUCcQ+E9BR1+ZVnHHS4HkwGZ3zJT736wZvQk8g@mail.gmail.com> <CAH8yC8mQ8t5Fd7s+yyeL2XoEkXieULN74d23aWX=wqQoqCxagw@mail.gmail.com> <9741bf217b3b1a3a60e567fa6886a9ba.squirrel@webmail.dreamhost.com> <CAH8yC8kfwYqDKrkgj1PwY3YdG4aa+aD8kM=DRvSVKsRsfQryCA@mail.gmail.com>
Date: Fri, 05 Jun 2015 14:24:27 -0700
From: Ryan Sleevi <ryan-pkix@sleevi.com>
To: noloader@gmail.com
User-Agent: SquirrelMail/1.4.21
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Archived-At: <http://mailarchive.ietf.org/arch/msg/pkix/4Dbroys6h8p3DpXIgSR-TWa57vU>
Cc: PKIX <pkix@ietf.org>
Subject: Re: [pkix] Please clarify when and where wildcards should be matched in PKIX certificates
X-BeenThere: pkix@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: ryan-pkix@sleevi.com
List-Id: PKIX Working Group <pkix.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/pkix>, <mailto:pkix-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/pkix/>
List-Post: <mailto:pkix@ietf.org>
List-Help: <mailto:pkix-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/pkix>, <mailto:pkix-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Jun 2015 21:24:30 -0000

On Fri, June 5, 2015 12:18 pm, Jeffrey Walton wrote:
>  OK, to be clear... the result of inaction is going to result in more
>  CVEs, like CVE-2015-1855.
>
>  Where the rubber meets the road, we have problems in practice. The
>  problems in practice point back to lack of clear direction.

No, this isn't correct.

CVE-2015-1855 has nothing to do with the domain boundary issue. It's all t
do with behaviours documented already in 6125.

The handling of domain boundaries is one of those "defense in depth"
things that depends on your application space and your threat model. In
the event it's "publicly trusted CAs" (e.g. the now shuttered WebPKI
group), then adding a check for "not wildcard TLD" is a defense against a
CA improperly implementing the Baseline Requirements. However, it's a
defense with tradeoffs - as noted on the Bugzilla discussions pointed to
elsewhere, we don't even have a solution for browsers yet.

Other elements of CVE-2015-1855 - things like "Don't allow wildcards for
IDNA", are treated by 6125 but weren't treated by 2616 because it wasn't
even a consideration for 2616.

Further still, elements of CVE-2015-1855 such as "Only allow one wildcard
label" are a judgement decision based on what type of certificates such a
client will expect to see. In the Web PKI, you should only ever see one
wildcard, and thus it's a sensible defense in depth check to add. However,
for internal CAs, it's not at all uncommon - I know, because I got yelled
at by users when I broke them by ensuring Chrome enforced the
one-wildcard-label rule. Even Google was serving some public
"*.*.domain.com" certificates (prior to the BRs notes about wildcard),
because "it just worked".

So I do want to stress that there's an element of policy in place here.
2616 defined how to match, but not what was acceptable. 5280 didn't
describe what was acceptable, because that's a matter of policy. The CA/B
Forum's Baseline Requirements detail what is acceptable, but _only_ in the
case of publicly trusted CA certificates used for TLS (implicitly and
primarily HTTPS, but not exclusively)

Disconnects like the one in Ruby come from when an implementation deals
with the technical aspect, but without touching upon the policy aspect for
the problem space. The IETF can't and doesn't know all the potential
policies that deployments may have - but tries to leave the right hooks
for policies to apply. The other thing to note is that policies change
over time, and sometimes rapidly so - for example, the CA/B Forum allowing
wildcards in EV certs iff that cert is for a .onion domain (and, for that
matter, allowing .onion domains as a temporary exception for CAs to
issue).

Finally, things like policy documents are somehow inherently
controversial. See the TLS BIS discussions. Or see the discussions of RFC
4158, which describes common algorithms that many implementations use in
satisfying the RFC 3280/5280 goals (although, notably, not Ruby or OpenSSL
:)

I don't think it's inherently wrong to put together something about "How
should publicly trusted certificates used for TLS" be validated by
clients, but I think it'd be a mistake to consider it normative
(implementations will/should do what's right for their users and security,
regardless of what a spec says), or permanent (threats change over time).
But sure, it could be helpful.

But I don't think that's what you want.