[Rats] Benjamin Kaduk's Discuss on draft-ietf-rats-tpm-based-network-device-attest-11: (with DISCUSS and COMMENT)

Benjamin Kaduk via Datatracker <noreply@ietf.org> Thu, 03 February 2022 05:05 UTC

Return-Path: <noreply@ietf.org>
X-Original-To: rats@ietf.org
Delivered-To: rats@ietfa.amsl.com
Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id E3D5F3A1A43; Wed, 2 Feb 2022 21:05:42 -0800 (PST)
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
From: Benjamin Kaduk via Datatracker <noreply@ietf.org>
To: The IESG <iesg@ietf.org>
Cc: draft-ietf-rats-tpm-based-network-device-attest@ietf.org, rats-chairs@ietf.org, rats@ietf.org, ncamwing@cisco.com, ncamwing@cisco.com
X-Test-IDTracker: no
X-IETF-IDTracker: 7.44.0
Auto-Submitted: auto-generated
Precedence: bulk
Reply-To: Benjamin Kaduk <kaduk@mit.edu>
Message-ID: <164386474289.9281.7903042481893051316@ietfa.amsl.com>
Date: Wed, 02 Feb 2022 21:05:42 -0800
Archived-At: <https://mailarchive.ietf.org/arch/msg/rats/MaB18pOu50eLNsw4d8sB4F4ht9g>
Subject: [Rats] Benjamin Kaduk's Discuss on draft-ietf-rats-tpm-based-network-device-attest-11: (with DISCUSS and COMMENT)
X-BeenThere: rats@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Remote ATtestation procedureS <rats.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rats>, <mailto:rats-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rats/>
List-Post: <mailto:rats@ietf.org>
List-Help: <mailto:rats-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rats>, <mailto:rats-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 03 Feb 2022 05:05:44 -0000

Benjamin Kaduk has entered the following ballot position for
draft-ietf-rats-tpm-based-network-device-attest-11: Discuss

When responding, please keep the subject line intact and reply to all
email addresses included in the To and CC lines. (Feel free to cut this
introductory paragraph, however.)


Please refer to https://www.ietf.org/blog/handling-iesg-ballot-positions/
for more information about how to handle DISCUSS and COMMENT positions.


The document, along with other ballot positions, can be found here:
https://datatracker.ietf.org/doc/draft-ietf-rats-tpm-based-network-device-attest/



----------------------------------------------------------------------
DISCUSS:
----------------------------------------------------------------------

Something of a process question, but in §2.3 we refer to
[Canonical-Event-Log] in a normative manner ("MUST be formatted according
to ..."), but the referenced document is marked as "draft" and "work in
progress", with warning that "Readers should not design products based
on this document".  Are we planning to hold publication of this document
until the TCG dependency is finalized?


----------------------------------------------------------------------
COMMENT:
----------------------------------------------------------------------

There are quite a few requirements that are stated in multiple locations
in this document, using normative language in the multiple locations.
This can lead to confusion and ambiguity if the different statements are
found to be subtly different, and I would recommend making a normative
statement of each requirement exactly once, with other instances merely
mentioning as a statement of fact that the behavior in question is
required.  I note some (but presumably not all) instances in the
section-by-section remarks as they occur.

Other than that, it's generally well-written and was quite easy to follow.
Thanks!  (That, of course, could not possibly keep me from having further
comments to make, though...)

Section 1.5

   3.  Conveyance of Evidence reliably transports the collected Evidence
       from Attester to a Verifier to allow a management station to
       perform a meaningful appraisal in Step 4.  The transport is
       typically carried out via a management network.  The channel must
       provide integrity and authenticity, and, in some use cases, may
       also require confidentiality.

It seems like there is some subtlety here if we insist that the
communications channel to a potentially untrustworthy endpoint will
provide integrity and authenticity (let alone confidentiality).  I suggest
giving more clarity on what threats these technical measures are
protecting against in relation to the potentially untrusted endpoint.

Section 2.1

   The result is that the Verifier can verify the device's identity by
   checking the subject attribute of the distinguished name and
   signature of the certificate containing the TPM's attestation public

Please just refer to the Subject [RFC5280] of the certificate; per
draft-ietf-uta-rfc6125bis the subjectAltName (not the DN) is the preferred
representation for this information.

   *  Credentials - Administrators may wish to verify via attestation
      that public keys (and other credentials) outside the Root of Trust
      have not been subject to unauthorized tampering.  (By definition,

It's a bit surprising to see public keys referred to as Credentials; while
a private key or a signed certificate might be deemed a credential, a
public key devoid of other context seems to just be a public key.  Unless
the intent was to refer to public keys that are entries in a trust store,
in which they might be said to be credentials of the trusted entities that
hold the corresponding private keys?

Section 2.2

   *  When separate Identity and Attestation keys are used, the
      Attestation Key (AK) and its X.509 certificate should parallel the
      DevID, with the same device ID information as the DevID
      certificate (that is, the same subject and subjectAltName (if
      present), even though the key pairs are different).  This allows a
      quote from the device, signed by an AK, to be linked directly to
      the device that provided it, by examining the corresponding AK
      certificate.  [...]

This seems to also implicitly assume that the issuer of these certificates
does not issue any other credentials using the same subject information.
When the device serial number is included, this seems pretty reliable, but
in other cases the situation is less clear.

Section 2.3

   5.  Quotes MUST be retrieved from the TPM according to TCG TAP
       Information Model [TAP] and the CHARRA YANG model
       [I-D.ietf-rats-yang-tpm-charra].  While the TAP IM gives a
       [...]
       the signature, to preserve the trust model.  The
       [I-D.ietf-rats-yang-tpm-charra] can be used for this purpose.

If we're going to MUST-level require something, then "can be used for this
purpose" seems inaccurate -- wouldn't "is used" be better?

Section 2.4

   *  The product to be attested MUST be shipped by the equipment vendor
      with both an IEEE 802.1AR Device Identity and an Initial
      Attestation Key (IAK) with certificate in place.  The IAK

I feel like this is maybe the third time we've had "MUST ship with IDevID
and IAK"; once is probably enough, and would avoid any confusion if the
different locations in the text are subsequently found to be subtly
different.
(A couple of the other requirements in this section are, I think,
duplicates for the second time.)

Section 2.4.2

   Quotes from a TPM can provide evidence of the state of a device up to
   the time the evidence was recorded, but to make sense of the quote in
   most cases an event log that identifies which software modules
   contributed which values to the quote during startup MUST also be
   provided.  [...]

The "in most cases" seems to be a heavy qualifier on the "MUST".  How do I
know when the "MUST" does not apply?  (Or does it always apply, and there
are just rare instances where it is not actually needed for Verifier
operation?)

Section 3.1.1

   A secure Device Identity (DevID) in the form of an IEEE 802.1AR DevID
   certificate [IEEE-802-1AR] MUST be provisioned in the Attester's
   TPMs.

(Fourth time as a "MUST"?)

Section 3.2.1

   Network Management systems MUST retrieve signed PCR based Evidence
   using [I-D.ietf-rats-yang-tpm-charra] with NETCONF or RESTCONF.

We had a MUST-level requirement up in §3.2 for "accomplished via an
interface that implements the YANG Data Model for [tpm-charra]", but this
one also requires (NETCONF or RESTCONF), excluding potential future
developments such as CORECONF.  This is exactly the sort of skew between
restatements of a single requirement that has been problematic in other
documents, as I alluded to previously.

   Implementations that use NETCONF MUST do so over a TLS or SSH secure
   tunnel.  Implementations that use RESTCONF transport MUST do so over
   a TLS or SSH secure tunnel.

This is not a requirement I've seen before.  Everything else typically
just uses the YANG security considerations boilerplate that notes that the
mandatory (to implement) secure transport for RESTCONF is TLS and the
mandatory secure transport for NETCONF is SSH.  I don't even know that you
*can* use SSH for RESTCONF (NETCONF seems pretty clear that TLS is okay).

Section 3.3

   In this application, each device may need to be equipped with signed
   RIMs to act as an Attester, and also an Appraisal Policy for Evidence
   and a selection of trusted X.509 root certificates, to allow the
   device to act as a Verifier.  An existing link layer protocol such as
   802.1X [IEEE-802.1X] or 802.1AE [IEEE-802.1AE], with Evidence being
   enclosed over a variant of EAP [RFC3748] or LLDP [LLDP] are suitable
   methods for such an exchange.

Should we say that the details of those "variant"s being out of scope for
this document?  (What we do say is pretty far from a complete solution.)

Section 5

Do we want to incorporate by reference the security considerations
discussed in any other documents?

There may also be some banal things to say about the security of the
system as a whole being compromised if any omissions are made when
building the parts for measuring code, configuration, etc.

Section 5.1

   With these elements, the device's manufacturer and serial number can
   be identified by analyzing the DevID certificate plus the chain of
   intermediate certificates leading back to the manufacturer's root
   certificate.  As is conventional in TLS or SSH connections, a random
   nonce must be signed by the device in response to a challenge,
   proving possession of its DevID private key.

   RIV uses the DevID to validate a TLS or SSH connection to the device
   as the attestation session begins.  Security of this process derives
   from TLS or SSH security, with the DevID providing proof that the
   session terminates on the intended device.  See [RFC8446], [RFC4253].

   Evidence of software integrity is delivered in the form of a quote
   signed by the TPM itself.  Because the contents of the quote are
   signed inside the TPM, any external modification (including

I think somewhere in here would be a good place to reiterate that we
require a binding between the DevID key and the AK as residing in the same
TPM on the device, and that we rely on the presence of the device serial
number as Subject information combined with trust in the manufacturer to
not reuse serial numbers (or sign bogus stuff) in order to obtain that
binding.
(Or maybe it fits better near the start of this section where we
specifically list the two different sets of keypairs.)

Section 5.2

   *  The entire device could be spoofed.  If the Verifier goes to
      appraise a specific Attester, it might be redirected to a
      different Attester.  Use of the 802.1AR Device Identity (DevID) in
      the TPM ensures that the Verifier's TLS or SSH session is in fact
      terminating on the right device.

We might mention that if the device in question is compromised it could
then go and tunnel the contents of that TLS or SSH session to a different
Attester.  (As I understand it, we then go on to talk about how such an
attack would be detected/prevented.)

   This is accomplished in RIV through use of an AK certificate with the
   same elements as the DevID (same manufacturer's serial number, signed
   by the same manufacturer's key), but containing the device's unique
   AK public key instead of the DevID public key.

I would probably reiterate that it is vital to the security of the system
to enforce that the AK and DevID certificates are signed by the same
manufacturer's key.

Section 5.4

   *  TCG document [Platform-DevID-TPM-2.0] shows how the initial
      Attestation keys can be used to certify LDevID and LAK keys.  Use
      of the LDevID and LAK allows the device owner to use a uniform
      identity structure across device types from multiple manufacturers
      (in the same way that an "Asset Tag" is used by many enterprises
      to identify devices they own).  [...]

I think we should go into more detail on how the requirements that applied
to manufacturers as relate to IDevID+IAK are translated to requirements on
device owners when they elect to use local device credentials.  E.g., the
requirement to use the same subject information in the certificates
remains, as does the requirement to not issue certs to multiple devices
that use the same identifier.  On the other hand, though, the requirement
for being signed "by the same manufacturer key" seems to need
modification, as the "same key" is going go be higher up in the
certification path now.  (Hmm, maybe in a slightly different spot in the
section, as it also applies to the "any other mechanism" bullet point.)

   Clearly, local keys can't be used for secure Zero Touch provisioning;
   installation of the local keys can only be done by some process that
   runs before the device is installed for network operation.

How does this assertion relate to what BRSKI (RFC 8995) does?

Section 5.5

   RIV also depends on reliable Reference Values, as expressed by the
   RIM [RIM].  The definition of trust procedures for RIMs is out of
   scope for RIV, and the device owner is free to use any policy to
   validate a set of reference measurements.  RIMs may be conveyed out-
   of-band or in-band, as part of the attestation process (see
   Section 3.1.3).  But for network devices, where software is usually
   shipped as a self-contained package, RIMs signed by the manufacturer
   and delivered in-band may be more convenient for the device owner.

Is there a risk of a "replay attack" for in-band delivery of RIM data?
That is, deliberaly giving the peer stale RIM data that corresponds to an
old (e.g., vulnerable) firmware instead of the latest one (for patched
firmware)?

Section 9.2

   to record the results, and a Root of Trust for Reporting to report
   the results [TCGRoT], [SP800-155], [SP800-193].

The [TCGRoT] reference contains the word "reporting" only once, in a
non-normative note that lists the "one or more security-specific
functions" that a RoT can perform, so it may not be a particularly good
reference here.  [SP800-193] seems to mention reporting only insofar as to
say that RTRec is for Recovery, not Reporting.

Section 9.4

   --------------------------------------------------------------------
   | Connect the TPM to the TLS stack                | Vendor TLS     |
   |    o  Use the DevID in the TPM to authenticate  | stack (This    |
   |       TAP connections, identifying the device   | action is      |
   |                                                 | simply         |
   |                                                 | configuring TLS|
   |                                               | to use the DevID |
   |                                               | as its client    |
   |                                               | certificate)     |

Configuring a TLS stack to use a certificate with inaccessible private key
is not always a "simple" action :)

   | Make CoSWID tags for BIOS/Loader/Kernel objects | IETF CoSWID    |

Should we use RFC numbers/I-D names in addition to prose names?

Section 10.1

It will be interesting to see what the RFC Editor thinks about [IMA] as a
normative reference.  I seem to recall some controversy over in NFSv4
about whether IMA was suitable to reference in an RFC...

RFC 7950 is cited only once, in a context that does not call out to be
classified as normative.  (Perhaps it should be cited from other locations
if it is indeed expected to be normative?)

I'm not convinced that RFC 8572 needs to be classified as normative.
While it does appear adjacent to a MUST, that seems to be of the form "if
you might be used for 8572, you MUST do <X> to be prepared".  Only the <X>
seems normative in that construction, not any use of 8572.

Section 10.2

If "A normative taxonomy of terms is given in
[I-D.ietf-rats-architecture]", how could we possibly classify that draft
as informative?

NITS

I found both https://github.com/ietf-rats-wg and
https://github.com/ietf-rats but neither seemed to have a repo that holds
current and ongoing development for this document, so I gave up and am
submitting these the old-fashioned way.

Section 1

   A generic architecture for remote attestation has been defined in
   [I-D.ietf-rats-architecture].  Additionally, the use cases for
   remotely attesting networking devices are discussed within Section 6
   of [I-D.richardson-rats-usecases].  [...]

I suggest s/the use cases/use cases/ -- no need to implicitly claim to be
an exhaustive listing.

Section 1.2

   or a threat detection and mitigation tool, etc.).  While informally
   referred to as attestation, this document focuses on a specific
   subset of attestation tasks, defined here as Remote Integrity
   Verification (RIV).  RIV takes a network equipment centric
   perspective that includes a set of protocols and procedures for

I suggest s/RIV takes/RIV in this document takes/

I also think that "network-equipment-centric" should be hyphenated, but
the RFC Editor will probably catch it if we're unsure.

Section 1.5

   Software used to boot a device can be described as a chain of
   measurements, anchored at the start by a Root of Trust for

I don't think that software in general can be described *as* a bunch of
measurements.  To say it is described *by* a bunch of measurements seems
much less problematic.

Section 1.7

   *  This solution is for use in non-privacy-preserving applications
      (for example, networking, Industrial IoT), avoiding the need for a
      Privacy Certificate Authority for attestation keys [AK-Enrollment]

The referenced document seems to indicate that the term "Attestation CA"
is now preferred to "Privacy CA".

   *  Run-Time Attestation: The Linux Integrity Measurement Architecture
      [IMA] attests each process launched after a device is started (and
      is in scope for RIV), but continuous run-time attestation of Linux

Perhaps "in scope for RIV in general"?

      or other multi-threaded operating system processes after they've
      started considerably expands the scope of the problem.  Many

I think that, sentence-structure wise, "they've" refers to the processes
having started, but perhaps we intend to refer to the OSes as having
started?

   *  Processor Sleep Modes: Network equipment typically does not
      "sleep", so sleep and hibernate modes are not considered.
      Although out of scope for RIV, Trusted Computing Group
      specifications do encompass sleep and hibernate states.

Are they out of scope for RIV in general or just for RIV as handled in
this document (for network equipment)?

   *  Virtualization and Containerization: In a non-virtualized system,
      the host OS is responsible for measuring each User Space file or
      process, but that's the end of the boot process.  For virtualized

We could probably tighten this up around "that's the end of the boot
process".  Is it that "the boot process (which is what this document
considers itself with) ends once the files have been verified" or maybe
"such measurement occurs after the boot process has completed"?

Section 2.1

       Reset---------------flow-of-time-during-boot--...------->

Is the '...' (vs '---') intentional?

Section 2.3

   2.  For devices using UEFI and Linux, measurements of firmware and
       bootable modules MUST be taken according to TCG PC Client
       [PC-Client-EFI-TPM-1.2] or [PC-Client-BIOS-TPM-2.0], and Linux
       IMA [IMA]

Full stop at end of sentence.

Section 3.3

Figure 5 lacks a "Step 0B" annotation (though I'd be hard-pressed to find
a place to fit it in)

Section 9.3

Why is there a box in Figure 6 for UDP, that doesn't line up with anything
else?

Also, the TAP (PTS2.0) box seems misaligned.