Re: [v6ops] Security issues in RFC8754 and related/subsequent drafts?

Andrew Alston <Andrew.Alston@liquidtelecom.com> Fri, 22 October 2021 06:54 UTC

Return-Path: <andrew.alston@liquidtelecom.com>
X-Original-To: v6ops@ietfa.amsl.com
Delivered-To: v6ops@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AAFE43A044E for <v6ops@ietfa.amsl.com>; Thu, 21 Oct 2021 23:54:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=liquidtelecom.com
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 DSJG3XCngWNR for <v6ops@ietfa.amsl.com>; Thu, 21 Oct 2021 23:54:04 -0700 (PDT)
Received: from eu-smtp-delivery-182.mimecast.com (eu-smtp-delivery-182.mimecast.com [185.58.86.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7A01B3A005F for <v6ops@ietf.org>; Thu, 21 Oct 2021 23:54:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=liquidtelecom.com; s=mimecast20210406; t=1634885642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eL+KPd5ElMjYTiBNAcrodMEnDSG6pbn3bTK9u0GwWOs=; b=M80lZwI82Ip7eRTo1+w75HONaB/7tvUIVUFeKembmJ7LK26t/Nmg87M6bT/VyrjaLEvWVq DjhnVYoJY0hfVxl9hmHdhyXaH6KLEjWUDjuQL/xMUNjWyNVQrTMapjEj/K+IoxNOF6VXg9 S+rqFyfU9spFZiDXFK3CEyO+CnOVOUo=
Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-he1eur02lp2050.outbound.protection.outlook.com [104.47.5.50]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-189-_lcYhxOYOVqdoPrPSRLIlA-1; Fri, 22 Oct 2021 07:54:00 +0100
X-MC-Unique: _lcYhxOYOVqdoPrPSRLIlA-1
Received: from AS8PR03MB7622.eurprd03.prod.outlook.com (2603:10a6:20b:346::6) by AS8PR03MB7637.eurprd03.prod.outlook.com (2603:10a6:20b:345::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Fri, 22 Oct 2021 06:53:59 +0000
Received: from AS8PR03MB7622.eurprd03.prod.outlook.com ([fe80::90ec:90d5:59c4:fef9]) by AS8PR03MB7622.eurprd03.prod.outlook.com ([fe80::90ec:90d5:59c4:fef9%6]) with mapi id 15.20.4628.018; Fri, 22 Oct 2021 06:53:59 +0000
From: Andrew Alston <Andrew.Alston@liquidtelecom.com>
To: Alexandre Petrescu <alexandre.petrescu@gmail.com>, "v6ops@ietf.org" <v6ops@ietf.org>
Thread-Topic: [v6ops] Security issues in RFC8754 and related/subsequent drafts?
Thread-Index: AQHXxp4zP+qugBEUYEKpNlrZT9uUPqveh3QAgAADc6A=
Date: Fri, 22 Oct 2021 06:53:59 +0000
Message-ID: <AS8PR03MB7622B9AFF074DAA5760FCC94EE809@AS8PR03MB7622.eurprd03.prod.outlook.com>
References: <CB45220A-ECE6-492A-8A37-D189A71CDA2B@liquidtelecom.com> <61f1f956-1ebd-3b62-078c-03d9f8fee42c@gmail.com>
In-Reply-To: <61f1f956-1ebd-3b62-078c-03d9f8fee42c@gmail.com>
Accept-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 60a3cafc-f554-4a90-bc35-08d99528b98d
x-ms-traffictypediagnostic: AS8PR03MB7637:
x-microsoft-antispam-prvs: <AS8PR03MB7637917DA5BEA10C5199B30CEE809@AS8PR03MB7637.eurprd03.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0
x-microsoft-antispam-message-info: ybIA2fX+60Lifn7cWP3mVQnEFRJRqTnHGcTM0pDon93z/zs0Hseb+wUecVvHSF9QPMvYvsDPTO7O0xMUIqTniFLMPktvYB3nE02bNB0hI0r7Vt+tG88CMNregCLv0hYOtfmq2n5ceWm9qQxIrJHvJIQi9hNXZg467/7t07chJuoJu/EUzCeTp9R9kciQ+gw+QMJfgKM/Gbl7EiU3se1hBC2lnOV3S2K+3EH2QG08dZDZWxqqr83H8RNGLj6yoEooRYAeC5vVdSgiqy6N2wONvjMG6oWec6VCD5x4zIthv6iv8HFsP8h6pvEj8wtu2Gm2tAnJZuN3Q4ABlQLHB09WekSC/QTD0lr0jb7cNpAwt6FFuXnaVMlCEGD9PgYb+jADdMeBjUikqYsdlmw5OL5bvxkUtDD4dQx8vesR0+n8iKf6H24UR7erNGAxsm+qPeId4FAI6llpSTTbhRZLo3pd4X3kWqSeCueSwGeAz4NdKs95rkPZM462NU+9rsexmUFwXqnXvpyvMA01E4MRz745/GaTkdqEmRms+sdJH4NieCxF9L1RLKTul0K6sx81hHSw0P6rM9OXCMEAX4naEhxrGNkr6ZOG5Vil3IEy/ovNzvmkxJxe443DxhWw65ZnEKRc6+dQp3ACod/rb5unFqU2XhUTKr4GVDsb0nidEbE5mYa2e/MOGQ3y7iCXeN+5jqZlLe+MF6YiN2JBjM48i2BklA==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR03MB7622.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(86362001)(2906002)(15650500001)(76116006)(66946007)(66574015)(55016002)(83380400001)(9686003)(38070700005)(33656002)(8936002)(110136005)(71200400001)(186003)(6506007)(38100700002)(8676002)(7696005)(5660300002)(498600001)(66476007)(122000001)(66446008)(64756008)(66556008)(52536014); DIR:OUT; SFP:1102
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: 5osGAW5AjqpUfQfkiMPSvi4Vzd3NYmK1IFFcTfp5LfdDkTV4o1gXMhrqWY4Qm84Rh9O4rxPzsCVds0z1K2wzUx/Myy7FsWVx8WWJDFsVgXbz4m2lnx52whYdJEEt6bHPRujYUnTcjZC9krDV6ruFbxH6s8JRZ0+ovL0A4Moj3P9n7mQqyE/npP89Lt7qv6cXeCzAse53lZGOAnM7Hs35xIEFgZOtS5wSbu6O4ss/vzTlnnmPmAalUZv7kVM1LiSiKpS9UdezVpg6HMOnvbneAs6C4b91npFfRODDitb8K0ggYy9/NudLaPtAH8SaD7+Rdm1sjVvkRA5o+ioIqvJEct9yYDXGlOS8o6CHedXSZRzFIrwoNW9pnK4X+lP6XeIwNzHpXEw+lCTj+8/0gdq939RLwaq3ABAe25vU1BbYCG7lFszhexvk+bAz1arsASsMcMyJOdlFu5WfIFC3CZ8DLjvr0s+VwjmrnAWs9pLw3w6ACzCJucu4gfUy+byYdIwhm3qDmMfdAoOuA4dKPvjodAjbnbmbkgXn0zsu1JqJarlFTmJYLNfAC0UNxP8ILXYDvBpQz0YCd/TPo6HhdZvi0n0/sbscku/HnqDgPAaBfDR9lRC8VUDFJz985E90NSzfdFwMYd2ZQuuc/jy67wJY7HZ19nbHw9Dt9bYm9o1uvs9bZ4zjGQjf+Cai9DGgyH4AkDX7DQTJY5gU+wxtWMD7NFzBqZCH1iuLs8wcUReyRHOKPiBB8FdgP9JjB7b4dhmYqA5AEbqTa3kn6QwglIEh05tDT9v4HvAQbrx+TbzfyJWYAeRvvXDXoN6DKkC/QOimzYCf5BWAyuG76njMchwc73vxekjtxDqD0ClBTMneznqb17nmv+xIM71Dhy3e8nuftDzTN43vFcqVFwz7hQqXaSEhON+cQ0qLQaH2g1io91iBylhmI5+bskzobWDEM8GGFi4tecM4FVSJkC6kl4Zu+GIGKpdJt/eJKeH7ASY4QvwyHjHbOVzImP4kjs35Th4pNzZdp5/gE/idQ/aRUp0jnFOKu6wFbrdcmRLkBiYODSKgYSfNHkJ7iVoxPUaA58YCa1rVibSDZD4QILbDW1dykbFXkMgwxn9DkUufxxMk1i2TEi0EELUTqEoosIFtGdXtXoAb+lHoTAHjVkuGKZIDs7ad2k8uEk/AH7C0Sd7mUfFy2h5TXDrGV66vFas3hvZ9aY0JaZFmiaUYb0hyWN84EwMjkgbwnFUU+yT81Em+dHS6bjFk3t8i65zII5/jkFOOPdG5j8LsKGvsAWrjMQVjYWk29KrDnzAkWBpgSEAgV8OcOm1ptRa481Eu0n8y6LiFt9g1NfAvvrJQHRjsl0+yjCEpclsf2QE27uiBIPCyJBThXfctJwXfsr+3L0XvRzBaLgHbwLmqYaVdyMs2IvbiNSm8QsoDYOJxWxhb42VIdw4sM4FbzCwBIOJaCKULW1eL3lxLGgDYSIqVSiunt+vzetiQFFfScTXoj66y4DCE5PnUbMhoeBZkmJ6d5FPmZHaN
MIME-Version: 1.0
X-OriginatorOrg: liquidtelecom.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AS8PR03MB7622.eurprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 60a3cafc-f554-4a90-bc35-08d99528b98d
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Oct 2021 06:53:59.2954 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 68792612-0f0e-46cb-b16a-fcb82fd80cb1
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: Andrew.Alston@liquidtelecom.com
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7637
Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C82A168 smtp.mailfrom=andrew.alston@liquidtelecom.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: liquidtelecom.com
Content-Language: en-US
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/v6ops/0bbBUv0wbAv9flI-_vHUCKovk9E>
Subject: Re: [v6ops] Security issues in RFC8754 and related/subsequent drafts?
X-BeenThere: v6ops@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: v6ops discussion list <v6ops.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/v6ops>, <mailto:v6ops-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/v6ops/>
List-Post: <mailto:v6ops@ietf.org>
List-Help: <mailto:v6ops-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/v6ops>, <mailto:v6ops-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 22 Oct 2021 06:54:17 -0000

> Is one of the points made the fact that BCP38 would not work with 
> RFC8754? Maybe an option is to update BCP38 or write another one titled 
> "multi-version and multi-source IP ingress filtering", or simply an 
> "IPv6 ingress filtering". Or maybe an IPsec-enabled SRH.

The issue is not really BCP38 itself - BCP38 is fine - the issue here is dynamic de-encapsulation.

Effectively - anything that can cause an arbitrary transit node to de-encapsulate and forward.  Once you can get a packet encapsulated, sent onto the network, and de-encapsulated by a random router, which then takes that internal packet and forwards it - unless you can read deeply enough into the packet to understand the internal packet and filter it, and have some seriously magic sauce that allows every transit node to know what to do with every internal packet - you have a problem.

Normally in a tunnel situation - the tunnel is de-encapsulated at specific configured points with specific behavior - in the SRv6 case - the moment it hits the first sid, the outer header is stripped and the internal - whatever it is - is forwarded via the FIB, and I know of no possible way to actively filter against that inner packet.  This is particularly true when no matter how deep you can look into the packet - another header can always be added to screw with this.

For example:

Lets consider I have a host of 2001:db8:30:30::10.

I craft an internal IPv6 packet with source 2001:db8:10:10::2 and destination address 2001:db8:20:20::2 

Now lets assume that we're using compression and my locator block is 2001:db8:30:: and I'm using a 16 bit SID of 5

I encapsulate that packet with an SRH with SA of the original host address (2001:db8:30:30::10) and DA 2001:db8:30:5:: and set it up so that’s the only sid.
The node sid 5 is at - will de-encap and forward - BCP38 fails at this point because the source passes the check - and the node where the de-encap occurs doesn't care, its gonna de-encap and forward regardless.

So - lets then take this a step further - and say I have fancy hardware that can look PAST an SRH - or a v6 header - and I still wanna be nasty.

I can craft a packet such that the outer header sends to 2001:db8:30:5::, the next header is again an SRH, and that sends to 2001:db8:30:6::, the next header is again an SRH, it sends to 2001:db8:30:5::, and then it de-encaps. 

My de-encap happens at the same place - but there is no way that I could ever look deep enough into the packet to see the *REAL* packet that’s gonna end up flowing after that de-encap - because no matter how deep you go - I can keep stacking headers.

The argument is going to come that - I can just filter for anything with an SRH - except, firstly, this assumes that every edge device I plug servers into can match and filter SRH - and I can point to plenty of ipv6 devices deployed out in the field out here that would have issues here, second, it assumes that there is sufficient tcam space to apply interface specific filters to every interface I may have a server in - this is no longer just "edge of the network" specific - because every in effect host because an "edge" for the purposes of this, and thirdly, it assumes that there is an SRH at all.

In the case of there NOT being an SRH - I have to start filtering on the locator block - that’s an LPM filter on every port/sub-interface that is not using SRv6.  There is no fail closed here as there would be with something like MPLS or anything with its own ether-type that has to be explicitly enabled.  Then, if we extend this scenario into the cloud.  You can end up in a situation where you have thousands of vlans facing a cloud stack - each of those will need a filter to protect, and there can never be a situation where one host is permitted to talk SRv6 that finds itself off an interface that contains other hosts that aren't - because you can't selectively filter in any realistic manner (Try doing SA/DA filter combinations across a few thousand interfaces with interface specific filters - see how long your tcams last)

Effectively - in very simple summary - when you make your "trusted" edge this wide - where every server on the network is a potential threat to inject packets the network is going to blindly act on - things get unmaintainable fast unless you have a default fail-closed scenario - that does not exist here.  We went through similar with normal source routing - we went through similar with RH0 - but here - we have created a way to effectively embed packets - have them flow onto the network - de-encapsulate them with zero real control - and forward them.  That, from an operator perspective, is a nightmare.

Andrew