Re: [tsvwg] I-D Action: draft-ietf-tsvwg-rfc4895-bis-02.txt
Michael Tuexen <michael.tuexen@lurchi.franken.de> Sun, 10 March 2024 09:30 UTC
Return-Path: <michael.tuexen@lurchi.franken.de>
X-Original-To: tsvwg@ietfa.amsl.com
Delivered-To: tsvwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5EF85C14F681 for <tsvwg@ietfa.amsl.com>; Sun, 10 Mar 2024 01:30:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.895
X-Spam-Level:
X-Spam-Status: No, score=-1.895 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wAUxlDc8Fqan for <tsvwg@ietfa.amsl.com>; Sun, 10 Mar 2024 01:30:27 -0800 (PST)
Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 46983C14F618 for <tsvwg@ietf.org>; Sun, 10 Mar 2024 01:30:25 -0800 (PST)
Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1140:c3d:70ba:7455:4261:9599]) (Authenticated sender: lurchi) by mail-n.franken.de (Postfix) with ESMTPSA id 74E8C721E2806; Sun, 10 Mar 2024 10:30:18 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\))
From: Michael Tuexen <michael.tuexen@lurchi.franken.de>
In-Reply-To: <GVXPR07MB96786EE4554285EA327565B389252@GVXPR07MB9678.eurprd07.prod.outlook.com>
Date: Sun, 10 Mar 2024 10:30:17 +0100
Cc: "tsvwg@ietf.org" <tsvwg@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <A374C7D2-1CF1-4E91-84E7-564FCC6102B2@lurchi.franken.de>
References: <GVXPR07MB96786EE4554285EA327565B389252@GVXPR07MB9678.eurprd07.prod.outlook.com>
To: John Mattsson <john.mattsson=40ericsson.com@dmarc.ietf.org>
X-Mailer: Apple Mail (2.3774.500.171.1.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/jLlB1VR_xJAUBkMyKvl8NzLS3jg>
Subject: Re: [tsvwg] I-D Action: draft-ietf-tsvwg-rfc4895-bis-02.txt
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Transport Area Working Group <tsvwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tsvwg/>
List-Post: <mailto:tsvwg@ietf.org>
List-Help: <mailto:tsvwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 10 Mar 2024 09:30:31 -0000
> On 10. Mar 2024, at 07:29, John Mattsson <john.mattsson=40ericsson.com@dmarc.ietf.org> wrote: > > Hi, > This seems to be work in progress. I assume the plan is to address all the vulnerabilities in some way. I have only focused on the security aspects. Hi John, thank you for the review. Right now my intention is to address the first and third issue brought up in https://mailarchive.ietf.org/arch/msg/tsvwg/8EyYbU-L-Tl_aMoUhCOuTV-pQ5c/ since allowing the reflection was not intended and we did not know that it might be critical to use the same keys for different HMAC algorithms. Right now my thinking is that improving the resistance against replay attacks is not a feature of SCTP AUTH. For chunk having sequence numbers like DATA chunk, it can be done by changing the keys appropriately. However, this belongs to the entity providing such improved protection like DTLS/SCTP. For control chunks not related to any sequence number SCTP is already doing such a protection. Please also note, that SCTP AUTH makes no assumption which chunks are protected. This is also decided by the upper layer. > - I think the document needs an overview that describes the changes from RFC 4895 and why they are done. The draft should e.g., describe that directional keys are introduced to stop reflection attacks. As RFC4895bis intent to continue to operate with RFC 4895 all the security issues with RFC 4895 needs to be clearly described. Yes, I agree. But I deferred writing the text about the changes, when all the changes are done. Right now, I focusses on the main problem, getting in the directioness of the keys. That way I can get feedback on that. > https://datatracker.ietf.org/meeting/115/materials/slides-115-tsvwg-sctp-auth-security-issues-00 > - If you decide to follow my previous suggestion to change HMAC to MAC. You could follow my other previous suggestion and register HMAC-SHA-256-128 instead. Having a 256-bit tag seems a bit overkill. Going from HMAC to MAC is on the ToDo list and I considered to do it first. But it requires a lot of changes, some are only editorial, some involve the API, but it is a lot without any functional change. So I decided to get in *one* directional method first. Then adding more is simple. I also decided to keep the way of writing, which is using text instead of formulas. But I guess it will be cleaner to use formulas. In particular to make the switch from HMAC to MAC simple. I saving 16 bytes critical? My plan is to evolve to state where we can handle arbitrary MACs. Just want to do this with one example, first. Which set of algorithms we then define initially is something I'm open about. > +-----------------+----------------------------------------------+ > | MAC Identifier | Message Digest Algorithm > | 0 | Reserved > | 1 | HMAC-SHA-1 | 2 | Reserved > | 3 | HMAC-SHA-256 > | 4 | HMAC-SHA-256-128 with directional keys > +-----------------+----------------------------------------------+ > - "If the peer does not operate in legacy mode, the send context is > defined as the concatenation of local key vector followed by the > remote key vector. The receive context is defined as the > concatenation of the remote key vector followed by the local key > vector. For deriving the association shared send and receive keys, a > method described in Section 3.1 of [RFC5926] is used. The > association shared send key is the result of using HMAC-SHA512 as the > key derivation function with the endpoint shared key as the > Master_Key, the send context as the Context and 512 as the > Output_Length. The association shared receive key is computed the > same way, just using the receive context as the Context. In both > cases "SCTP-AUTH" is used as the Label." > That this creates directional key contradicts another statement in the draft saying that "Otherwise, the key vectors are identical". Isn't that mentioned in the paragraph about operating in legacy mode? In that context it is true. > - My understanding that the new API text forbids per-packet switching of algorithms leading to the same key being used in several algorithms. This should be clearly described. I can really parse this sentence. It is correct, that user messages are tied to a key. But how does that result in "the same key being used in several algorithms"? This is possible in legacy mode, if one endpoint uses HMAC-SHA1 and the other HMAC-SHA256. But when not in legacy mode, each side uses a different key. Isn't that acceptable? > - My understanding is that the document does not protect against replay of control chunks. If that is not planned, the document should clearly state that is does not provide replay protection. The deduplication mechanism in RFC 9260 is not replay protection, and SCTP-AUTH is a security protocol. What is replay protection? In my view this is a method to ensure that if you get a chunk again, no problems arise. It doesn't matter if the packet comes from an attacker or is duplicated in the network. My understanding is that SCTP AUTH allows the receiver to verify that the packet was sent from the peer. Not once, not recently. It is up the the entity doing the key management to do it appropriately to achieve its goals. SCTP AUTH also makes no assumption on what chunks are protected. It only states, which chunks can not be protected. I would also be interested which control chunk you think need special handling. I think every SCTP should handle them appropriately if they are duplicated. > - My understanding is that the document does not protect against replay of data chunks the same direction (yet). I.e., after 2^32 data chunks the TSN reaches the Initial TSN and an on-path attacker can replay authenticated data chunks as the Stream Identifier, and Stream Sequence Number “match”. If user messages are large (more chunks than 2^32), replay can trivially be done after 2^32 chunks when the TSN reaches the Initial TSN. So you are talking about user messages larger than 6 TB... Providing protection against such an attack was not a goal of RFC 4895. Why do you think it was? Why do you think the bis document needs to do this. It can be a component for such a protection, for example when used in combination with DTLS, but it is not providing it by itself. I guess we should agree on goals for RFC 4895. > (If this is not fixed the document need to clearly describe that it does not provide integrity of user data. The document does Where does it make such a statement? It is not making any statement about DATA chunks, except discussing that AUTH chunks are control chunks and can not be placed after DATA chunks. So where are your assumptions about services provided from SCTP AUTH are coming from? > not state that it does, but the reader cannot be expected to understand that the lack of replay protection lead to lack of integrity protection of the user data. The end user is likely interested in integrity of the user data). It might be, but where is it stated that just using SCTP AUTH gives that service? Best regards Michael > Cheers, > John
- [tsvwg] I-D Action: draft-ietf-tsvwg-rfc4895-bis-… internet-drafts
- Re: [tsvwg] I-D Action: draft-ietf-tsvwg-rfc4895-… Michael Tuexen
- Re: [tsvwg] I-D Action: draft-ietf-tsvwg-rfc4895-… John Mattsson
- Re: [tsvwg] I-D Action: draft-ietf-tsvwg-rfc4895-… Michael Tuexen
- Re: [tsvwg] I-D Action: draft-ietf-tsvwg-rfc4895-… Michael Tuexen
- Re: [tsvwg] I-D Action: draft-ietf-tsvwg-rfc4895-… Magnus Westerlund
- Re: [tsvwg] I-D Action: draft-ietf-tsvwg-rfc4895-… Michael Tuexen