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: =?utf-8?B?NW9zR0FXNUFqcXBVZlFma2lNUFN2aTRWemQzTlltSzFJRkZjVGZwNUxmZERr?= =?utf-8?B?VFY0bzFnWE1ocnFXWTRRbTg0Umg5TzRyeFB6c0NWZHMwejFLMnd6VXgvTXl5?= =?utf-8?B?N0ZzV1Z4OFdXSkRGc1ZnWGJ6NG0ybG54NTJ3aFlkSkVFdDZiSFBSdWpZVW5U?= =?utf-8?B?Y2paQzlrckRWNnJ1RmJ4SDZzOEpSWjArb3ZMMEE0TW9qM1A5bjdtUXF5RS9u?= =?utf-8?B?cFA4OUx0N3F2NmNYZUN6QXNlNTNsWkdPQW5NN0hzMzV4SUVGZ1pPdFM1d1Ni?= =?utf-8?B?dTZPNHNzL3Z6VGxubm1QbUFhbFVadjdrVk0xTGlTaUtwUzlVZGV6VnBnNkhN?= =?utf-8?B?T252Ym5lQXM2QzRiOTFucEZmUk9ERGl0YjhLMGdnWXk5L051ZExhUHRBSDhT?= =?utf-8?B?YUQ3K1JkbTFzalZ2a1JBNW8raW9JcXZKRWN0OXlZRFhHbE9TOG82Q0hlZFhT?= =?utf-8?B?WlJ6Rklyd29OVzlwbks0WCtsUDZYZUl3TnpIcFhFdytsQ1RqKzgvMGdkcTkz?= =?utf-8?B?OVJM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-8?B?UFVhQTU4WUNhMXJWaWJTRFpENFFJTGJEVzFkeWtiRlhrTWd3eG45RGtVdWZ4?= =?utf-8?B?eE1rMWkyVEVpMEVFTFVUcUVvb3NJRnRHZFh0WG9BYitsSG9UQUhqVmt1R0ta?= =?utf-8?B?SURzN2FkMms4dUVrL0FIN0MwU2Q3bVVmRnkyaDVUWERyR1Y2NnZGYXMzaHZa?= =?utf-8?B?OWFZMEphWkZtaWFVWWIwaHlXTjg0RXdNamtnYnduRlVVK3lUODFFbStkSFM2?= =?utf-8?B?YmpGazN0OGk2NXpJSTUvamtGT09QZEc1ajhMc0tHdnNBV3JqTVFWallXazI5?= =?utf-8?B?S3JEbnpBa1dCcGdTRUFnVjhPY09tMXB0UmE0ODFFdTBuOHk2TGlGdDlnMU5m?= =?utf-8?B?QXZ2ckpRSFJqc2wwK3lqQ0VwY2xzZjJRRTI3dWlCSVBDeUpCVGhYZmN0SndY?= =?utf-8?B?ZnNyKzNMMFh2UnpCYUxnSGJ3TG1xWWFWZHlNczJJdmJpTlNtOFFzb0RZT0p4?= =?utf-8?B?V3hoYjQyVklkdzRzTTRGYnpDd0JJT0phQ0tVTFcxZUwzbHhMR2dEWVNJcVZT?= =?utf-8?B?aXVudCt2emV0aVFGRmZTY1RYb2o2Nnk0RENFNVBuVWJNaG9lQlprbUo2ZDVG?= =?utf-8?Q?PmZHaN?=
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