Re: [6tisch] [secdir] secdir review of draft-ietf-6tisch-architecture-21

"Pascal Thubert (pthubert)" <pthubert@cisco.com> Tue, 25 June 2019 12:24 UTC

Return-Path: <pthubert@cisco.com>
X-Original-To: 6tisch@ietfa.amsl.com
Delivered-To: 6tisch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 38E531200CC for <6tisch@ietfa.amsl.com>; Tue, 25 Jun 2019 05:24:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.5
X-Spam-Level:
X-Spam-Status: No, score=-14.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com header.b=U4wTE8Su; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=Ew46T/K+
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 Sn1FsDDozyV9 for <6tisch@ietfa.amsl.com>; Tue, 25 Jun 2019 05:24:05 -0700 (PDT)
Received: from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9960312000E for <6tisch@ietf.org>; Tue, 25 Jun 2019 05:24:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=13868; q=dns/txt; s=iport; t=1561465445; x=1562675045; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=93pXwzFUoJ16B89nuQdiRi2ZUQ1L45dpK2yqsawAlyE=; b=U4wTE8SuEayKeKCcBVo7bRg7M0074wj6BlBvugJXJ6ePioDSvcfwx1CQ PApJpBhy5081uUmrzYE/IjwlBTYzBYgsGx6sjmdPpXccbmQ7Wwy0lN21z neXsThqeHJGyWpimPL+hLloYSjj3afgr6skInwYEcBjhkEkqsvbllbT1N c=;
IronPort-PHdr: 9a23:TIagShAsz2E0qztMm7XGUyQJPHJ1sqjoPgMT9pssgq5PdaLm5Zn5IUjD/qs03kTRU9Dd7PRJw6rNvqbsVHZIwK7JsWtKMfkuHwQAld1QmgUhBMCfDkiuNOLqciY3BthqX15+9Hb9Ok9QS47z
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AdAACZERJd/5xdJa1mGQEBAQEBAQEBAQEBAQcBAQEBAQGBVgEBAQEBAQsBgUMpJwNqVSAECyiEFoNHA45hgluXOIJSA1QJAQEBDAEBGxICAQGEQAIXglwjNwYOAQMBAQQBAQIBBW2KNwyFSgEBAQECARIRBA0MAQEHMAEEBwQCAQgRAQMBAQECAiYCAgIwFQIGCAIEAQkEBQgagjVMgWoDDg8BApoLAoE4iF9xfjOCeQEBBYUAGIIRCYEMKAGEcIQkdoE2HReBQD+BEUaCTD6ERoMIMoImi3oMgk6HIJM/ZQkCghWLMohUl06NKJcOAgQCBAUCDgEBBYFmIoFYcBWDJwmCOAwXg02ECYZKcoEpjCIrgiUBAQ
X-IronPort-AV: E=Sophos;i="5.63,415,1557187200"; d="scan'208";a="494950874"
Received: from rcdn-core-5.cisco.com ([173.37.93.156]) by rcdn-iport-9.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 25 Jun 2019 12:24:03 +0000
Received: from XCH-ALN-007.cisco.com (xch-aln-007.cisco.com [173.36.7.17]) by rcdn-core-5.cisco.com (8.15.2/8.15.2) with ESMTPS id x5PCO24b024591 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 25 Jun 2019 12:24:03 GMT
Received: from xhs-aln-001.cisco.com (173.37.135.118) by XCH-ALN-007.cisco.com (173.36.7.17) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 25 Jun 2019 07:24:01 -0500
Received: from xhs-aln-002.cisco.com (173.37.135.119) by xhs-aln-001.cisco.com (173.37.135.118) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 25 Jun 2019 07:24:01 -0500
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (173.37.151.57) by xhs-aln-002.cisco.com (173.37.135.119) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 25 Jun 2019 07:24:01 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=93pXwzFUoJ16B89nuQdiRi2ZUQ1L45dpK2yqsawAlyE=; b=Ew46T/K+h02vw3r1LN2FxBqeUZ0ZUOCxOkiwxa2108v9OoA996nEXayK1MG3JeXWkkcbcWOOJUpzN7otv/4kwwdLArJOK9n4Es62ibyQwox/nRbMdr0FATBMGqLz2WnfNDlDDETCHsv/rPqcCQ9QIdwIPlfGrqHcf5phULagFeY=
Received: from MN2PR11MB3565.namprd11.prod.outlook.com (20.178.250.159) by MN2PR11MB4397.namprd11.prod.outlook.com (52.135.38.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Tue, 25 Jun 2019 12:24:00 +0000
Received: from MN2PR11MB3565.namprd11.prod.outlook.com ([fe80::1ce9:1582:146c:c50a]) by MN2PR11MB3565.namprd11.prod.outlook.com ([fe80::1ce9:1582:146c:c50a%6]) with mapi id 15.20.2008.017; Tue, 25 Jun 2019 12:24:00 +0000
From: "Pascal Thubert (pthubert)" <pthubert@cisco.com>
To: Mališa Vučinić <malishav@gmail.com>, Tero Kivinen <kivinen@iki.fi>
CC: "6tisch@ietf.org" <6tisch@ietf.org>
Thread-Topic: [secdir] secdir review of draft-ietf-6tisch-architecture-21
Thread-Index: AQHVKitVZAMqDsUZHEuS/CYS/vDUhKaqVH6wgAEk6YCAAAywAIAAbXDggAACzzCAABNngIAAP2Ug
Date: Tue, 25 Jun 2019 12:23:31 +0000
Deferred-Delivery: Tue, 25 Jun 2019 12:22:37 +0000
Message-ID: <MN2PR11MB356594FAACDB5497907ECF63D8E30@MN2PR11MB3565.namprd11.prod.outlook.com>
References: <2cced16c-d1df-88c2-eb21-7452b42f081a@mandelberg.org> <MN2PR11MB35651735463F27A247B4B0F0D8E00@MN2PR11MB3565.namprd11.prod.outlook.com> <23825.24715.882644.180316@fireball.acr.fi> <5229f400-076c-80e3-e0dc-a7cf3998abed@mandelberg.org> <MN2PR11MB35654D7658F0EEB05443F2ABD8E30@MN2PR11MB3565.namprd11.prod.outlook.com> <BYAPR11MB3558261B37E1E8FFFF4D8D27D8E30@BYAPR11MB3558.namprd11.prod.outlook.com> <62FC2528-9165-4E2E-89E5-6452D93030E0@gmail.com>
In-Reply-To: <62FC2528-9165-4E2E-89E5-6452D93030E0@gmail.com>
Accept-Language: fr-FR, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=pthubert@cisco.com;
x-originating-ip: [2001:420:44f3:1300:552f:ff32:b86:aad7]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 4811e6e7-8cf7-441c-0cc6-08d6f96800de
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MN2PR11MB4397;
x-ms-traffictypediagnostic: MN2PR11MB4397:
x-ms-exchange-purlcount: 1
x-microsoft-antispam-prvs: <MN2PR11MB43972B3DD3BD011A5A36F2D7D8E30@MN2PR11MB4397.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0079056367
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(39860400002)(396003)(366004)(346002)(376002)(136003)(199004)(189003)(13464003)(86362001)(7736002)(8936002)(14444005)(316002)(2906002)(9686003)(229853002)(14454004)(66574012)(55016002)(53936002)(256004)(81166006)(6246003)(81156014)(33656002)(561944003)(110136005)(52536014)(6666004)(6436002)(99286004)(478600001)(8676002)(446003)(5660300002)(6116002)(486006)(305945005)(11346002)(53546011)(6506007)(186003)(15974865002)(476003)(46003)(73956011)(71190400001)(71200400001)(102836004)(25786009)(74316002)(7696005)(76116006)(66946007)(76176011)(66556008)(66476007)(64756008)(68736007)(66446008)(4326008)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB4397; H:MN2PR11MB3565.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: xdo2+GqwVbeWszQA/cvh5AZorlKjhgkDYijjBy6OlW44P+BFiANDHGUcL4t69a3q8AdyMSNLoGcEsnqGX6SKU7BFxfdERSkCjpivnniAm08tO6BQYf5xR8rGYYBKrC0rt7sw+s3V7GsnRUuKWGGJRTKl7IZd8I9c5ygYv49AyfqXxDj2Z1GAVAuPtRl5TizPabmDxisPDZ0M8pA5agYo3HKcPCwcOCQ0bMXfGsrThxqh0uqEN5F1htrFq2OKLYy4hUZbKkks0QGGFlEgKF+R6z/TgBkZ7SQi3znxJ4TQXKc/rhNkswErImfvg+Ak7JNtroHLOqLsFuZVxqVB33/nLDD3i7FN/2AtMXQyOlHNsrhtI+n27EJNqebxGOUJgqwWbNCB78tz4cWTAra5B43pVmhbAZq3MqS4ViOaXPWAQnU=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 4811e6e7-8cf7-441c-0cc6-08d6f96800de
X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jun 2019 12:24:00.4072 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: pthubert@cisco.com
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4397
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.36.7.17, xch-aln-007.cisco.com
X-Outbound-Node: rcdn-core-5.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/6tisch/sgPukkxWNVZe6d_aFGoZduohxYI>
Subject: Re: [6tisch] [secdir] secdir review of draft-ietf-6tisch-architecture-21
X-BeenThere: 6tisch@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discuss link layer model for Deterministic IPv6 over the TSCH mode of IEEE 802.15.4e, and impacts on RPL and 6LoWPAN such as resource allocation" <6tisch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/6tisch>, <mailto:6tisch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/6tisch/>
List-Post: <mailto:6tisch@ietf.org>
List-Help: <mailto:6tisch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/6tisch>, <mailto:6tisch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Jun 2019 12:24:09 -0000

Hello Malisa
 
> The issue raised seems valid and going through minimal-security and the MSF
> draft it seems that some clarification is needed. We purposely avoided keeping
> the network notion of time at the JRC in order to facilitate deployments where
> JRC is outside of the local network and is managing multiple 6tisch networks. I
> do not believe we want to change that, as it would be quite challenging to
> require the synchronization of the JRC with each 6tisch network.

Yes, I remember that discussion. Bottom line is that the proposal that Tero mentioned is not used.
Note that since we use RPL, the absolute source of Truth is the Root. But the root is several hops away and we cannot get the ASN directly so whatever we transfer to the node will be offset by the propagation time.


> 
> Instead, as with traditional TSCH, the joined node can obtain its time
> information from its time source neighbor, i.e. RPL preferred parent, by
> triggering an exchange of link-layer frames with L2 security features enabled.

Yes, but as Tero mentioned even an authenticated beacon can be replayed, making the node believe it is somewhere in the past. 


> The MSF draft already mandates that the first outgoing message from the
> joined node after joining is the 6P ADD message to its preferred parent, which
> consequently gets protected with L2 security. What needs to be specified
> clearly is that this first 6P exchange should not be encrypted but only

Is MSF the best place for this? 

I believe that the architecture should say something vague like " a first exchange is needed with a node that is trusted and already joined, e.g., a RPL time parent, and that message should not be encrypted but only authenticated at L2. The request from the pledge should contain a nonce and the response should contain the signed nonce+ASN+stuff. " On that base, MSF and minimal-security could elaborate on which message exactly is used.

> authenticated at L2. Upon successful completion of the first 6P exchange with
> its time (routing) parent, the joined node obtains a negotiated cell and as a
> side effect proves freshness of the ASN used.

Am I missing something? Looks like an ASN would appear to work if it is correct modulo the number of channels, something like 16... Which the attacker can derive by observing the period of transmissions by a node, doing, e.g., 6tisch minimal support.

> What seems missing is some text in minimal-security adding guidance for
> other scheduling function and stressing this issue beyond the text in the last
> paragraph of Section 9 of draft-ietf-6tisch-minimal-security-11 that is rather
> vague.

Yes : ) I'm working on high level text in archie, and will propose it to you and Tero. I'll be happy that you refer to it and refine it in minimal-security.

All the best

Pascal



> Mališa
> 
> > On 25 Jun 2019, at 09:29, Pascal Thubert (pthubert) <pthubert@cisco.com>
> wrote:
> >
> > Hello Malisa:
> >
> > I went through the security section of minimal-security and found that the
> text below would be useful there to. Alt a pointer to the security section of the
> architecture would do once I incorporate some of the below.
> > (Though I thought it did at a time) minimal-security does not indicate that
> the JRC should be aware of the network ASN to enable the protection that
> Tero is discussing below, does it?
> >
> > All the best,
> >
> > Pascal
> >
> >
> >
> >> -----Original Message-----
> >> From: David Mandelberg <david@mandelberg.org>
> >> Sent: mardi 25 juin 2019 02:31
> >> To: Tero Kivinen <kivinen@iki.fi>; Pascal Thubert (pthubert)
> >> <pthubert@cisco.com>
> >> Cc: secdir@ietf.org; iesg@ietf.org;
> >> draft-ietf-6tisch-architecture.all@ietf.org;
> >> Thomas Watteyne <thomas.watteyne@inria.fr>; Michael Richardson
> >> <mcr+ietf@sandelman.ca>; Mališa Vučinić <malisav@ac.me>
> >> Subject: Re: [secdir] secdir review of
> >> draft-ietf-6tisch-architecture-21
> >>
> >>
> >>
> >> On 6/24/19 7:45 PM, Tero Kivinen wrote:
> >>> Pascal Thubert (pthubert) writes:
> >>>> Hello David:
> >>>>
> >>>> Many thanks for your review. I do hope that you found it interesting.
> >>>>
> >>>>> Sections 4.2.1 and 4.3.4 talk about the security of joining a
> >>>>> network, and time synchronization, respectively. Do any of the
> >>>>> security mechanisms in 4.2.1 rely on having an accurate clock?
> >>>>> (E.g., to distrust old/expired keys.) Is time synchronization done
> >>>>> before the join process, and is there any way to exploit time
> >>>>> synchronization in order to cause a node to join a malicious
> >>>>> network?
> >>>>
> >>>> This is really a MAC layer question for IEEE. I'm cc'ing Thomas who
> >>>> was one of the inventors of TSCH, as well as Michael and Malisa who
> >>>> led the join process study.
> >>>>
> >>>> Time synchronization (date):
> >>>> --------------------------------------
> >>>> For all I know, the time sync is about giving a epoch time from
> >>>> which an Absolute Slot Number (ASN, expressed in slot duration
> >>>> e.g.,
> >>>> 10ms) is derived. ASN plays a key role as it is used in NONCE. An
> >>>> attack that one could think of would be to fool the new node into
> >>>> thinking that ASN is earlier. This could happen before the keys are
> >>>> exchanged, or if an authorized peer is compromised. For the former,
> >>>> I'll defer to the others to answer fully how we protect the new
> >>>> comer. For the latter, 6TiSCH provides an additional protection
> >>>> since we derive time from a RPL parent. RPL has its own
> >>>> protections, some of them in the standard itself, some of them in
> >>>> zerotrust papers that need publishing.
> >>>
> >>> In normal TSCH in 802.15.4 the joining node will listen to beacons
> >>> sent by the nodes already part of the network, and they will find
> >>> out the ASN from there. As they do not yet have keys for the network
> >>> they cannot verify the message integrity code authenticating the
> >>> beacon, and even if they did have the keys, they still cannot verify
> >>> it as it could be replay by attacker.
> >>>
> >>> After they find out the ASN, they need to authenticate themself to
> >>> the network using some mechanism outside the 802.15.4. This
> >>> authentication step must be such that it cannot be replayed by
> >>> attacker, i.e., they must not trust ASN giving them any protection.
> >>>
> >>> Note, that in general 802.15.4 TSCH DOES NOT provide replay
> >>> protection at all. I.e., attacker can cause legimite node to
> >>> retransmit its previous message by destroying ack, and upper layer
> >>> protocol must provide way to detect replays and cope with them.
> >>>
> >>> During the authentication the JRC needs to provide the keying
> >>> material to the joining node, but that does NOT provide protection
> >>> against spoofed ASN. After the node has actual keys used in the
> >>> network it still needs to verify the ASN by sending some message to
> >>> JRC using authentication and verify that JRC replies to that.
> >>>
> >>> If this 2nd step is omitted attacker do following attack:
> >>>
> >>> Joining node (JN)   attacker	     		  JRC
> >>> 		    <- beacon for ASN=23	  <- beacon for ASN=44
> >>> See beacon
> >>> from attacker,
> >>> assume ASN=23.
> >>>
> >>> Auth->JRC
> >>> (no security)					  Check authentication
> >>> 						  Return keys
> >>> 						  keys->JN
> >>>
> >>> Receive keys
> >>> send first
> >>> frame using
> >>> keys using ASN=23->
> >>>
> >>>
> >>> Now, if JN is using extended address to generate nonce, the nonce
> >>> will be different for all other nonces ever used, even the ASN is
> >>> faked, and has been used before. On the other hand if JN also
> >>> receives short address assignment from the JRC, JRC needs to make
> >>> sure that short address has not been assigned to anybody else
> >>> before, as if it was used by someone else, and frame sent by JN is
> >>> encrypted, then attacker will now have two packets with same ASN,
> >>> and short address, meaning same nonce, and it can now decrypt packets.
> >>
> >> Is this discussion of nonce reuse in any relevant documents already,
> >> or is it something that should be added somewhere?
> >>
> >>> Note, that attacker might be able to replay valid ACKs for the frame
> >>> sent by the JN, provided that the JRC (or whoever JN sent the
> >>> message
> >>> to) happened to ack message using the same ASN attacker faked for JN.
> >>>
> >>> If JN sends message to JRC which only JRC can reply, and uses wrong
> >>> ASN, the JRC will not be able to decrypt/validate that frame because
> >>> of wrong ASN in nonce, and will drop it silently, so if JN uses
> >>> wrong ASN it might be getting ACKs, but it will not get any real
> >>> reply frames back from real participants in the network. After it
> >>> will not receive confirmation from JRC that it has proper keys and
> >>> ASN, it knows something went wrong.
> >>>
> >>>
> >>>> Time synthonization (precise tic, hourless)
> >>>> --------------------------------------------------------
> >>>> This is the process whereby a node corrects its tic to realign with
> >>>> the parent. ASN is not changed but the drift of crystals is
> >>>> compensated. An attacker could try to inject a sense of time that
> >>>> it slightly shifted to the point that the node lose sync with the
> >>>> rest of the network (the guard time is like an event horizon). Then
> >>>> again, RPL provides an additional protection on top of the MAC
> provisions.
> >>>
> >>> Those time syncronization IEs are also protected by MAC level
> >>> authentication, so attackers who do not know the keys cannot
> >>> generate them. Attackers who do know keys can do whatever they like
> anyways...
> >>>
> >>> Btw, I will be leaving for vacation tomorrow, so I might not be able
> >>> to reply any messages related to this until I get back end of next
> >>> week.
> >>>
> >
> > --
> > MailScanner believes this is threat-free - www.ucg.ac.me
> >