[lisp] Eric Rescorla's Discuss on draft-ietf-lisp-rfc6833bis-16: (with DISCUSS and COMMENT)

Eric Rescorla <ekr@rtfm.com> Thu, 27 September 2018 12:16 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: lisp@ietf.org
Delivered-To: lisp@ietfa.amsl.com
Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id 36C71128CE4; Thu, 27 Sep 2018 05:16:00 -0700 (PDT)
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
From: Eric Rescorla <ekr@rtfm.com>
To: "The IESG" <iesg@ietf.org>
Cc: draft-ietf-lisp-rfc6833bis@ietf.org, Luigi Iannone <ggx@gigix.net>, lisp-chairs@ietf.org, ggx@gigix.net, lisp@ietf.org
X-Test-IDTracker: no
X-IETF-IDTracker: 6.84.0
Auto-Submitted: auto-generated
Precedence: bulk
Message-ID: <153805056019.26512.877252229948689152.idtracker@ietfa.amsl.com>
Date: Thu, 27 Sep 2018 05:16:00 -0700
Archived-At: <https://mailarchive.ietf.org/arch/msg/lisp/xSSmVOYESJPX-7qdS86tGaB-HWc>
Subject: [lisp] Eric Rescorla's Discuss on draft-ietf-lisp-rfc6833bis-16: (with DISCUSS and COMMENT)
X-BeenThere: lisp@ietf.org
X-Mailman-Version: 2.1.29
List-Id: List for the discussion of the Locator/ID Separation Protocol <lisp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/lisp>, <mailto:lisp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/lisp/>
List-Post: <mailto:lisp@ietf.org>
List-Help: <mailto:lisp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lisp>, <mailto:lisp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Sep 2018 12:16:01 -0000

Eric Rescorla has entered the following ballot position for
draft-ietf-lisp-rfc6833bis-16: 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/iesg/statement/discuss-criteria.html
for more information about IESG DISCUSS and COMMENT positions.

The document, along with other ballot positions, can be found here:


This DISCUSS is somewhat arbitratrily on 6833bis, but many
of the same issues apply to 6830bis.

I concur with Ben's DISCUSS. I do not believe that these documents
have adequate security to advance to Proposed Standard.

I thought it might be helpful for me to lay out my starting
assumptions and threat model and what I think the appropriate standard
is here. That gives us an opportunity to discuss them prior to
getting into the specific security issues I raise below.

Per offline discussion, I understand that despite some of the
introductory material, LISP is not currently intended to be Internet
scale but rather to run in what seem to be fairly tightly controlled
environments. Thus, I am assuming the following facts about
the system:

- The Mapping Service itself is secure and trusted.  For the purposed
  of this discussion, I'm modelling all the entities in the services
  as one trusted element.

- The ETRs have a preconfigured relationship with the Mapping Service,
  which includes some sort of shared key and an ACL on the Mapping
  Service which tells it which EIDs anm ETR can advertise. How
  this gets established is out of scope of this discussion.

Note that neither of these assumptions would be reasonable in
an Internet scale system, but I'm assuming that the text about
that in these documents will be removed.

Because it's not in the document set before us, nor is it a normative
reference, I am disregarding LISP-SEC and only analyzing the system as
specified in these documents.

I'm assuming the usual RFC 3552 threat model, I.e.,

- All non-Map Server elements in the system (specifically, endpoints
  and the xTRs are potentially malicious).

- Aside from the links between the Map Server elements, the network
  is controlled by the attacker.

Against this background, my expectation is that the attacker
should not be able to affect traffic in any fashion significantly
more effective than tampering with the data plane. For instance,
it's clearly the case that an on-path attacker between two xTRs
can drop all the packets or forward them to some third xTR, but
it should not be able to send a small number of packets which
would then affect the routing of a large number of packets.

I do not expect that the data plane should have better security
than native (non-IPsec) traffic. Given the nature of LISP and
the existence of a mapping system, it seems like it's kind of
a missed opportunity to deploy a credentials system that would
support IPsec-style data plane security, but given that this
isn't a generally safe assumption for IP traffic, and therefore
you need to provide some sort of transport or application security
anyway, I don't think it's the right standard to hold LISP to.

LISP appears to be vulnerable to a number of routing attacks that
I claim above it should not be subject to. For example:

1. An on-path attacker can forge Map Replys to the ITR,
   thus redirecting traffic.

2. An ETR can perform an "overclaiming" attack in which it
   claims to be responsible for EIDs which it is not actually
   responsible for.

3. An off-path attacker can temporarily reroute traffic by exploiting
   the "gleaning" feature to cache poison an ITR. In addition, the
   "echo noncing" feature does not appear to have a sufficiently strong
   nonce to protect against forgery, and thus turning this into a
   long-term attack

4. An attacker may be able to perform a number of cache invalidation
   and contamination attacks by exploiting the Map-Version and
   Locator-Status bits. This may lead to DoS.

5. An attacker who was at time T responsible for an EID block
   can probably prolong its ability to respond for that block
   even after it is no longer responsible.

6. A number of the components appear to be subject to various replay

I note that many of these attacks are documented in the Security
Considerations for these documents. Also, I doubt this list is
exhaustive. As noted above, I have spent no time on the data plane

When looking at attacks, it's important to determine whether there are
plausible defenses. For most of these, I believe that the answer is
"yes", at varying levels of cost. As noted above, LISP-SEC appears to
be intended to address a number of these issues, so it's possible that
requiring LISP-SEC would go a fair ways towards addressing these
issues. A cursory look at LISP-SEC turns up some somewhat concerning
design choices, so I would have to examine it more closely to give a
real opinion.

I do not believe that LISP-SEC will address the attacks that do not
involve the Mapping Server. For instance, the gleaning
contamination/nonce attacks (3) would not appear to be fixed by
LISP-SEC. However, it's probably possible to fix them by lengthening
the nonce.

With that said, I tend to think that the overall authentication
architecture here would benefit from a rethink. At a high level, the
source of most of these problems is the "non-transferability" of the
mapping information from the Map Server. If the Map Server instead had
an asymmetric key pair which it used to sign mappings, then almost all
of these attacks would not work. Specifically:

- The map server could send signed Map Replys so forgery wouldn't work

- Map Replys from ETRs would be signed, so you couldn't overclaim

- Gleaning attacks would sort of work, but because the probe would
  elicit a Map Reply, you couldn't persist them

- Map Versions could be tied to signed objects, so you couldn't do
  cache invalidation by version. You'd probably need some other
  approach for Locator Status bits.

And so on.

Detailed review below, with some duplication....

Rich version of this review at:

S 5.2.
>      s: This is the SMR-invoked bit.  This bit is set to 1 when an xTR is
>         sending a Map-Request in response to a received SMR-based Map-
>         Request.
>      m: This is the LISP mobile-node m-bit.  This bit is set by xTRs that
>         operate as a mobile node as defined in [I-D.ietf-lisp-mn].

This would appear to create a normative reference to this document. To
avoid that, you need to specify how I behave if I receive it but I
don't implement lisp-mn.

S 5.2.
>      m: This is the LISP mobile-node m-bit.  This bit is set by xTRs that
>         operate as a mobile node as defined in [I-D.ietf-lisp-mn].
>      I: This is the xTR-ID bit.  When this bit is set, what is appended to
>         the Map-Request is a 128-bit xTR router-ID.  See LISP PubSub usage
>         procedures in [I-D.ietf-lisp-pubsub] for details.

here too you seem to be creating a normative reference.

S 5.5.
>         is being mapped from a multicast destination EID.
>   5.5.  EID-to-RLOC UDP Map-Reply Message
>      A Map-Reply returns an EID-Prefix with a prefix length that is less
>      than or equal to the EID being requested.  The EID being requested is

How do I behave if I receive an EID-Prefix that is less than any of my
mappings. So, I might have mappings for and
and someone asks me for Also, when you talk about prefix
length, I assume you mean the length fo the mask?

S 5.6.
>      Authentication Data:  This is the message digest used from the output
>         of the MAC algorithm.  The entire Map-Register payload is
>         authenticated with this field preset to 0.  After the MAC is
>         computed, it is placed in this field.  Implementations of this
>         specification MUST include support for HMAC-SHA-1-96 [RFC2404],
>         and support for HMAC-SHA-256-128 [RFC4868] is RECOMMENDED.

What prevents replay attacks here? I'm guessing it's the Map-Version-
Number, but as I understand it, I can set this to 0.

S 6.1.
>      receives an SMR-based Map-Request and the source is not in the
>      Locator-Set for the stored Map-Cache entry, then the responding Map-
>      Request MUST be sent with an EID destination to the mapping database
>      system.  Since the mapping database system is a more secure way to
>      reach an authoritative ETR, it will deliver the Map-Request to the
>      authoritative source of the mapping data.

If I'm understanding this correctly, this allows an ETR to prevent an
ITR from learning that it is no longer the appropriate ETR for a
prefix. The way this attack works is that before the topology shift, I
send SMRs, thus causing Map-Requests, which, because my entry is
cached, refresh the cache on the ITR past the topology shift. I can
keep doing this indefinitely. Am I missing something

S 8.2.
>      authentication data, so prior to sending a Map-Register message, the
>      ETR and Map-Server SHOULD be configured with a shared secret or other
>      relevant authentication information.  A Map-Server's configuration
>      SHOULD also include a list of the EID-Prefixes for which each ETR is
>      authoritative.  Upon receipt of a Map-Register from an ETR, a Map-
>      Server accepts only EID-Prefixes that are configured for that ETR.

How does it know?


S 5.
>        \ |           UDP Length          |        UDP Checksum           |
>          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>          |                                                               |
>          |                         LISP Message                          |
>          |                                                               |
>          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

What do these two diagrams correspond to? v4 and v6? This needs

S 5.2.
>      Type:   1 (Map-Request)
>      A: This is an authoritative bit, which is set to 0 for UDP-based Map-
>         Requests sent by an ITR.  It is set to 1 when an ITR wants the
>         destination site to return the Map-Reply rather than the mapping
>         database system.

I don't understand this sentence, as literally it would say that you
should not return "the mapping database system" but that doesn't make
any sense.

S 5.2.
>      P: This is the probe-bit, which indicates that a Map-Request SHOULD
>         be treated as a Locator reachability probe.  The receiver SHOULD
>         respond with a Map-Reply with the probe-bit set, indicating that
>         the Map-Reply is a Locator reachability probe reply, with the
>         nonce copied from the Map-Request.  See RLOC-Probing Section 7.1
>         for more details.

How am I supposed to handle this if I am a Map Server.

S 5.2.
>         receipt.
>      L: This is the local-xtr bit.  It is used by an xTR in a LISP site to
>         tell other xTRs in the same site that it is part of the RLOC-set
>         for the LISP site.  The L-bit is set to 1 when the RLOC is the
>         sender's IP address.

Is the xTR supposed to filter this on exiting the site.

S 5.2.
>      Nonce:  This is an 8-octet random value created by the sender of the
>         Map-Request.  This nonce will be returned in the Map-Reply.  The
>         security of the LISP mapping protocol critically depends on the
>         strength of the nonce in the Map-Request message.  The nonce
>         SHOULD be generated by a properly seeded pseudo-random (or strong

This seems like it needs to be a MUST.

S 5.3.
>      originating Map-Request source.  If the RLOC is not in the Locator-
>      Set, then the ETR MUST send the "verifying Map-Request" to the
>      "piggybacked" EID.  Doing this forces the "verifying Map-Request" to
>      go through the mapping database system to reach the authoritative
>      source of information about that EID, guarding against RLOC-spoofing
>      in the "piggybacked" mapping data.

This text here doesn't seem compatible with either of the two cases
listed in "EID-prefix" above.

S 5.4.
>      Nonce:  This is a 24-bit value set in a Data-Probe
>         [I-D.ietf-lisp-rfc6830bis] or a 64-bit value from the Map-Request
>         is echoed in this 'Nonce' field of the Map-Reply.  When a 24-bit
>         value is supplied, it resides in the low-order 64 bits of the
>         'Nonce' field.

Nit: a 64-bit quantity doesn't really have low-order bits if it's not
numeric. Do you mean "rightmost"? Also, what are the other bits.

S 5.4.
>         'Nonce' field.
>      Record TTL:  This is the time in minutes the recipient of the Map-
>         Reply will store the mapping.  If the TTL is 0, the entry MUST be
>         removed from the cache immediately.  If the value is 0xffffffff,
>         the recipient can decide locally how long to store the mapping.

Am I supposed to merge this with previous mappings? REmove them?

S 8.3.
>      of the mapping database protocols.
>   8.3.  Map-Server Processing
>      Once a Map-Server has EID-Prefixes registered by its client ETRs, it
>      can accept and process Map-Requests for them.

This section is confusing because the introduction says that this
function is only performed by Map-Resolvers:
"The LISP Mapping Service defines two new types of LISP-speaking
   devices: the Map-Resolver, which accepts Map-Requests from an
   Tunnel Router (ITR) and "resolves" the EID-to-RLOC mapping using a
   mapping database; and the Map-Server, which learns authoritative
   to-RLOC mappings from an Egress Tunnel Router (ETR) and publishes
   them in a database."