Re: [TLS] Certificate validation can of worms

mrex@sap.com (Martin Rex) Mon, 07 April 2014 20:23 UTC

Return-Path: <mrex@sap.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6E41C1A07FC for <tls@ietfa.amsl.com>; Mon, 7 Apr 2014 13:23:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.653
X-Spam-Level:
X-Spam-Status: No, score=-4.653 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
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 sMh_lveFYi72 for <tls@ietfa.amsl.com>; Mon, 7 Apr 2014 13:23:26 -0700 (PDT)
Received: from smtpde02.sap-ag.de (smtpde02.sap-ag.de [155.56.68.140]) by ietfa.amsl.com (Postfix) with ESMTP id 94D4F1A07AE for <tls@ietf.org>; Mon, 7 Apr 2014 13:23:26 -0700 (PDT)
Received: from mail05.wdf.sap.corp by smtpde02.sap-ag.de (26) with ESMTP id s37KNI8J012256 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Apr 2014 22:23:18 +0200 (MEST)
In-Reply-To: <CACsn0ckFoqQ=hwp=Wxjjrt6LavLoKSUCyBCp=TvWvJ3DsuhUsw@mail.gmail.com>
To: Watson Ladd <watsonbladd@gmail.com>
Date: Mon, 07 Apr 2014 22:23:18 +0200
X-Mailer: ELM [version 2.4ME+ PL125 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="US-ASCII"
Message-Id: <20140407202318.97EA41ACAA@ld9781.wdf.sap.corp>
From: mrex@sap.com
X-SAP: out
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/VEb10Kf09HlGZvmTSyKSAPGgcVk
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Certificate validation can of worms
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: mrex@sap.com
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 07 Apr 2014 20:23:32 -0000

Watson Ladd wrote:
>
> https://www.cs.utexas.edu/~shmat/shmat_oak14.pdf contains tests of
> many TLS implementations. Interestingly all tested implementations
> contain errors, and all but OpenSSL erroneous accepts. Cryptlib was
> not tested, because it doesn't validate certificates.

That paper seems to contain a few flawed assumptions
on what characteristics is to be expected from implementations of
X.509 or PKIX, and on which specific checks a TLS client is supposed
to do.

As much as some may dislike this, the extendedKeyUsage in an end entity
certificate is completely irrelevant for TLS (rfc2246/rfc4346/rfc5246)
as well as HTTP-over-TLS (rfc2818).   I don't know whether there currently
exists _any_ X-over-TLS protocol specification that addresses EKU.

There seem to be very few protocols that specify requirements for the EKU
value in the end entity cert (such as OCSP: rfc2560 & bis) and timestamps
(rfc3161).

Similar for certificate policies and policy constraints.  They're completely
irrelevant for any X-over-TLS, and it would be unwise to assume that they
are not simply ignored.


Implementing name constraints (other than Distinguished Name) is
a mere option.  The usage of a subjectAltName name constraint alone
(i.e. without a Distinguished name name constraints to go with it)
as depicted in Fig. 1 can be a security problem for CRL checking
because any CRL signer whose certificate can be verified under the same
trust anchor is specified to be an acceptable CRL signer.


-Martin