[lamps] draft-ietf-lamps-rfc3709bis-01 security, reliability, and privacy considerations

Daniel Kahn Gillmor <dkg@fifthhorseman.net> Fri, 25 March 2022 20:14 UTC

Return-Path: <dkg@fifthhorseman.net>
X-Original-To: spasm@ietfa.amsl.com
Delivered-To: spasm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E1D473A07E9 for <spasm@ietfa.amsl.com>; Fri, 25 Mar 2022 13:14:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.109
X-Spam-Level:
X-Spam-Status: No, score=-2.109 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=fifthhorseman.net header.b=tDI7bDU6; dkim=pass (2048-bit key) header.d=fifthhorseman.net header.b=PQgzR+De
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 WsmYkI3RWGJm for <spasm@ietfa.amsl.com>; Fri, 25 Mar 2022 13:14:18 -0700 (PDT)
Received: from che.mayfirst.org (che.mayfirst.org [IPv6:2001:470:1:116::7]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BB6F23A07E3 for <spasm@ietf.org>; Fri, 25 Mar 2022 13:14:18 -0700 (PDT)
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1648239256; h=from : to : subject : date : message-id : mime-version : content-type : from; bh=iPjZyCDXYYdebVWkDoehjiwSKZIxnurrqMvTcFvbPgI=; b=tDI7bDU6dgObbyebxFWOgv9X5UvLwMpUpsLQpq8BvyJwdns2sL0njqpdA4aRTf7IkjjKy rID3y+FDmMGkDlqCg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1648239256; h=from : to : subject : date : message-id : mime-version : content-type : from; bh=iPjZyCDXYYdebVWkDoehjiwSKZIxnurrqMvTcFvbPgI=; b=PQgzR+DeIKgdZi5RX2ZaDHw3tGDK1hw0eEvlRYihYbPFwuqP3PuB+/67LaLF8x45zWmp3 s11xsxAZts3xJA0ArLjMy56ZeRdbLbgZ1AdZzcH/PGNvu8ZCjHHZnxFt/uP69w9Dzl4rd91 s8H8UhlYbJFkOvrrjOK53mW0T/0Ca0NnwVCFjTr0zPmxQCwciHfWk4eiS7U7V9GfTYHCg/P AJI00OpUAl3TOqznuAjLBY1Brg89u32Qe1iXDGqFZrYJ2A+NmkEo+MT53PIDZ71S42Y0Ach enPHpEboa0U+NIrQoTt66L0GnD/e7IkpYqZysmUMHNh1H/zJi7tC4eaqZMAA==
Received: from fifthhorseman.net (lair.fifthhorseman.net [108.58.6.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id AEACDF9AD for <spasm@ietf.org>; Fri, 25 Mar 2022 16:14:16 -0400 (EDT)
Received: by fifthhorseman.net (Postfix, from userid 1000) id D547F2046C; Fri, 25 Mar 2022 16:14:11 -0400 (EDT)
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: LAMPS WG <spasm@ietf.org>
Autocrypt: addr=dkg@fifthhorseman.net; prefer-encrypt=mutual; keydata= mDMEX+i03xYJKwYBBAHaRw8BAQdACA4xvL/xI5dHedcnkf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A8d01vqoxOlQ3O6cb/kFYAjqx3oMXSBhYh BMKfigwB81402BaqXOCS6zpcoQ26AADX7gD/b83VObe14xrNP8xcltRrBZF5OE1rQSPkMNy+eWpk eCwA/1hxiS8ZxL5/elNjXiWuHXEvUGnRoVj745Vl48sZPVYMuDgEX+i03xIKKwYBBAGXVQEFAQEH QIGex1WZbH6xhUBve5mblScGYU+Y8QJOomXH+rr5tMsMAwEICYjJBBgWCgB7BYJf6LTfBYkFn6YA CRDgkus6XKENukcUAAAAAAAeACBzYWx0QG5vdGF0aW9ucy5zZXF1b2lhLXBncC5vcmcEAx9vTD3b J0SXkhvcRcCr6uIDJwic3KFKxkH1m4QW0QKbDAIeARYhBMKfigwB81402BaqXOCS6zpcoQ26AAAX mwD8CWmukxwskU82RZLMk5fm1wCgMB5z8dA50KLw3rgsCykBAKg1w/Y7XpBS3SlXEegIg1K1e6dR fRxL7Z37WZXoH8AH
Date: Fri, 25 Mar 2022 16:14:10 -0400
Message-ID: <877d8hx019.fsf@fifthhorseman.net>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha256"; protocol="application/pgp-signature"
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/ibzotD5bRvM0Qg8DvdgM35LE6QY>
Subject: [lamps] draft-ietf-lamps-rfc3709bis-01 security, reliability, and privacy considerations
X-BeenThere: spasm@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is a venue for discussion of doing Some Pkix And SMime \(spasm\) work." <spasm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/spasm>, <mailto:spasm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm/>
List-Post: <mailto:spasm@ietf.org>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/spasm>, <mailto:spasm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 25 Mar 2022 20:14:24 -0000

I did a quick skim of
https://www.ietf.org/archive/id/draft-ietf-lamps-rfc3709bis-01.html and
observed that while the Security Considerations section describes some
of the "phone home" or "web bug" concerns about logotypes-by-reference,
they aren't particularly well fleshed out.

The current text is:

  > Logotype data is fetched from a server when it is needed. By
  > watching activity on the network, an observer can determine which
  > clients are making use of certificates that contain particular
  > logotype data. This observation can potentially introduce privacy
  > issues. Since clients are expected to locally cache logotype data,
  > network traffic to the server containing the logotype data will not
  > be generated every time the certificate is used. In cases where
  > logotype data is not cashed, monitoring would reveal usage
  > frequency. In cases where logotype data is cached, monitoring would
  > reveal when a certain logotype image or audio sequence is used for
  > the first time.

This and at least one other paragraph in the Security Considerations
section might belong better in a separate Privacy Considerations
section.

Below i unpack a bit why these "web bugs" features are not well-fleshed
out in the draft as it stands.  This spec is surprisingly twisty and
complex, so i'm not sure that this covers everything:

 a) there are at least two different things that a relying party might
    need to make a network call when trying to render a certificate:

    - an indirect LogotypeData object
    - the image or audio file referenced from a LogotypeData object

    If the client is going to cache these things to avoid leaking
    information on the network, it presumably needs to cache both types
    of object.

 b) to minimize the number of network requests the relying party's cache
    should be indexed by cryptographic digest of the objects it
    holds. Since a single object might be referenced by multiple
    cryptographic digests, a maximally privacy-protective local cache
    should probably contain one index per supported digest algorithm.

 c) If any one of the elements in logotypeHash is already in the relying
    party's local cache, the privacy-preservng thing for the client to
    do is to ignore all logotypeURI elements, even if some of the
    logotypeHash objects are not found in the cache.

 d) note that the *lack* of a network request for a given URI can also
    be used for fingerprinting (depending on how the client deals with
    newly-encountered certs, this could be analogous to HSTS
    fingerprinting, for example:
    https://datatracker.ietf.org/doc/html/rfc6797#section-14.9)

 e) If a subscriber asks the issuer to include an image or audio via
    URL, or if they ask the issuer for an indirect logotype, the issuer
    can't be sure that any logo data suggested by the subscriber is
    going to be available for the lifetime of the certificate at the URL
    proposed.  Furthermore, the issuer has no control over privacy
    policies that govern metadata collection by the host of any remote
    resource.  This draft should encourage an issuer who cares about
    potential privacy risks for its relying parties to copy any
    referenced data to a server that it already controls and can make
    reasonable guarantees about privacy, reliability, etc.  Note also
    that if the subscriber asks the issuer to refer to an indirect
    LogotypeData object, and the issuer decides to host that data itself
    in addition to hosting the underlying image or audio resource, the
    logotypeData object will need to be rewritten to change the
    underlying URLs (and will therefore have a different digest than the
    requested object).  This at least makes the privacy situation
    comparable to CA-controlled OCSP, rather than subscriber-controlled
    resources.

 f) i didn't see any guidance to relying parties about how to handle a
    mismatch between the MIME type referenced in the mediaType field of
    the logotypeData and the Content-Type HTTP header of the retrieved
    resource.  Consider a polymorphic bytestream that could be
    interpreted by either a png renderer or a pdf renderer.  As the spec
    is currently written, it looks like a client could accept a
    Content-Type from the https server that doesn't match the mediaType
    field, and it might accept the HTTP header as ground truth.

 g) the draft should offer additional guidance for a CA that wants to
    demonstrate a commitment to not planting web bugs in its
    certificates.  here are several approaches, including:

      - Always using direct LogotypeInfo objects (no network access)

      - Self-host referenced objects (as in (e))
      
      - Consolidate hosted objects (all objects with the same hash are
        always at the same URI, to avoid path-based fingerprinting)

      - ensure that encoded non-data URIs are as low-entropy as
        possible, to limit the amount of individualized tracking that
        could be done (a distinct URL per cert would be the most
        dangerous)

 h) advise relying parties on how to constrain their HTTP resource
    fetches to minimize fingerprinting (e.g., no cookies, no e-tags,
    anonymized user-agent, no client certificates, and so on) -- is
    there some sort of anonymous HTTP client profile we could point to?
    (note that this might contradict the guidance about performing
    "appropriate security controls" for privacy-sensitive logos)

A few additional concerns about the draft (sorry this is all smushed
into a single e-mail -- if there is an issue tracker for this draft,
please reference it in subsequent versions of the draft so that these
notes can be broken out separately):

 i) not clear how to map the elements in the logotypeHash sequence of
    hashes to the elements in the logotypeURI sequence of URIs.  Should
    every reference within a given logotypeDetails refer to the same
    underlying object?  (this is related to (c) above).

 j) this might be an ASN.1 confusion on my part, but the index
    parameters within LogotypeImageInfo object seem off to me.  they
    start with [0] for the "type" field, but then language is [4] and
    there are four fields in between (fileSize, xSize, ySize, and
    resolution).  Shouldn't language be [5] or am i misunderstanding
    ASN.1?

 k) this draft implies a range of types of logotype: subjects, issuers,
    loyalty schemes, etc.  It's pretty easy to see this as expanding
    beyond use of logos (e.g. photo IDs for an S/MIME cert).  i'd hope
    to see some considerations either explicitly ruling out non-logo use
    of these objects, or at least addressing the privacy implications of
    using them for non-logo use.

 l) when fetching an indirect logotype, what Content-Type should the
    relying party expect for the LogotypeData?   I'm assuming it's
    supposed to be DER-encoded?

 m) no security considerations for folding polymorphic image renderers
    into certificate handling code?  we have recent evidence that there
    can be pretty disastrous bugs lurking there:
    https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-into-nso-zero-click.html
    guidance about ensuring narrow, well-audited codepaths would be
    great.

Sorry this review is so long and yet still incomplete.  There are a lot
of moving parts in this draft.

i welcome comments, feedback, questions about anything that's unclear here.

   --dkg

PS the Security Considerations section contains the word "cashed" when i
   think it means "cached"