Re: [pkix] [Technical Errata Reported] RFC3029 (6444)

Russ Housley <housley@vigilsec.com> Sat, 27 February 2021 07:45 UTC

Return-Path: <housley@vigilsec.com>
X-Original-To: pkix@ietfa.amsl.com
Delivered-To: pkix@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8C60C3A13DA for <pkix@ietfa.amsl.com>; Fri, 26 Feb 2021 23:45:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=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 YcjQqTDFS_Yd for <pkix@ietfa.amsl.com>; Fri, 26 Feb 2021 23:45:17 -0800 (PST)
Received: from mail.smeinc.net (mail.smeinc.net [209.135.209.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 855993A13D9 for <pkix@ietf.org>; Fri, 26 Feb 2021 23:45:17 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by mail.smeinc.net (Postfix) with ESMTP id DB71D300BDD for <pkix@ietf.org>; Sat, 27 Feb 2021 02:45:14 -0500 (EST)
X-Virus-Scanned: amavisd-new at mail.smeinc.net
Received: from mail.smeinc.net ([127.0.0.1]) by localhost (mail.smeinc.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id juCjrauHJILl for <pkix@ietf.org>; Sat, 27 Feb 2021 02:45:12 -0500 (EST)
Received: from [192.168.1.161] (pool-141-156-161-153.washdc.fios.verizon.net [141.156.161.153]) by mail.smeinc.net (Postfix) with ESMTPSA id ED31C300ADB; Sat, 27 Feb 2021 02:45:11 -0500 (EST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\))
From: Russ Housley <housley@vigilsec.com>
In-Reply-To: <20210226205457.C1E5FF40764@rfc-editor.org>
Date: Sat, 27 Feb 2021 02:45:12 -0500
Cc: Carlisle Adams <cadams@site.uottawa.ca>, Stefan Santesson <stefan@aaa-sec.com>, IETF PKIX <pkix@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <109BE558-3363-4030-A906-E329B7ED28B4@vigilsec.com>
References: <20210226205457.C1E5FF40764@rfc-editor.org>
To: "Roman D. Danyliw" <rdd@cert.org>, Ben Kaduk <kaduk@mit.edu>
X-Mailer: Apple Mail (2.3445.104.17)
Archived-At: <https://mailarchive.ietf.org/arch/msg/pkix/Cb4h9gZ-F12jrOVABNeF5Tvl3-Y>
Subject: Re: [pkix] [Technical Errata Reported] RFC3029 (6444)
X-BeenThere: pkix@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
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: <https://mailarchive.ietf.org/arch/browse/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: Sat, 27 Feb 2021 07:45:21 -0000

I guess I should have held off on reporting this ASN.1 error.  Once I corrected it, I discovered two errors that I do not know how to fix.

There is an implementation somewhere because Appendix F contains examples.  I do not know how the implementer got around these two problems.


PROBLEM 1:

CertEtcToken ::= CHOICE {
     certificate                  [0] IMPLICIT Certificate ,
     esscertid                    [1] ESSCertId ,
     pkistatus                    [2] IMPLICIT PKIStatusInfo ,
     assertion                    [3] ContentInfo ,
     crl                          [4] IMPLICIT CertificateList,
     ocspcertstatus               [5] IMPLICIT CertStatus,
     oscpcertid                   [6] IMPLICIT CertId ,
     oscpresponse                 [7] IMPLICIT OCSPResponse,
     capabilities                 [8] SMIMECapabilities,
     extension                    Extension{{ExtensionSet}}
}

CertEtcToken is a CHOICE with tags 0 through 8, but CertStatus CHOICE with tags 0 through 2.  You cannot nest a CHOICE in another CHOICE is the IMPLICIT tags overlap.

The use of EXPLICIT tagging would have solved the problem, but the authors clearly preferred IMPLICIT tags.


PROBLEM 2

DigestInfo ::= SEQUENCE {
    digestAlgorithm   DigestAlgorithmIdentifier,
    digest            Digest
}

Data ::= CHOICE {
      message           OCTET STRING ,
      messageImprint    DigestInfo,
      certs             SEQUENCE SIZE (1..MAX) OF
                            TargetEtcChain
}

DigestInfo is a SEQUENCE, and certs is a SEQUENCE, so the two have the same tag.  A recipient cannot tell which one the sender intended.

Russ



> On Feb 26, 2021, at 3:54 PM, RFC Errata System <rfc-editor@rfc-editor.org> wrote:
> 
> The following errata report has been submitted for RFC3029,
> "Internet X.509 Public Key Infrastructure Data Validation and Certification Server Protocols".
> 
> --------------------------------------
> You may review the report below and at:
> https://www.rfc-editor.org/errata/eid6444
> 
> --------------------------------------
> Type: Technical
> Reported by: Russ Housley <housley@vigilsec.com>
> 
> Section: Appendix E
> 
> Original Text
> -------------
>  GeneralName, PolicyInformation
>  FROM PKIX1Implicit88 {iso(1) identified-organization(3)
>  dod(6) internet(1) security(5) mechanisms(5) pkix(7)
>  id-mod(0) id-pkix1-implicit-88(2)}
> 
> Corrected Text
> --------------
>  GeneralName, GeneralNames, PolicyInformation
>  FROM PKIX1Implicit88 {iso(1) identified-organization(3)
>  dod(6) internet(1) security(5) mechanisms(5) pkix(7)
>  id-mod(0) id-pkix1-implicit-88(2)}
> 
> Notes
> -----
> The ASN.1 Module uses GeneralName and GeneralNames, but only one of them is IMPORTed.  The suggested fix IMPORTS both of GeneralName and GeneralNames.
> 
> Instructions:
> -------------
> This erratum is currently posted as "Reported". If necessary, please
> use "Reply All" to discuss whether it should be verified or
> rejected. When a decision is reached, the verifying party  
> can log in to change the status and edit the report, if necessary. 
> 
> --------------------------------------
> RFC3029 (draft-ietf-pkix-dcs-07)
> --------------------------------------
> Title               : Internet X.509 Public Key Infrastructure Data Validation and Certification Server Protocols
> Publication Date    : February 2001
> Author(s)           : C. Adams, P. Sylvester, M. Zolotarev, R. Zuccherato
> Category            : EXPERIMENTAL
> Source              : Public-Key Infrastructure (X.509)
> Area                : Security
> Stream              : IETF
> Verifying Party     : IESG