[radext] PSK identity encoding in Radius TLS-PSK

Heikki Vatiainen <hvn@radiatorsoftware.com> Tue, 19 March 2024 02:16 UTC

Return-Path: <hvn@radiatorsoftware.com>
X-Original-To: radext@ietfa.amsl.com
Delivered-To: radext@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7D0C4C14F6B7 for <radext@ietfa.amsl.com>; Mon, 18 Mar 2024 19:16:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.906
X-Spam-Level:
X-Spam-Status: No, score=-1.906 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=radiatorsoftware-com.20230601.gappssmtp.com
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 4Klo4mSSDOIs for <radext@ietfa.amsl.com>; Mon, 18 Mar 2024 19:16:10 -0700 (PDT)
Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C0CB7C14F5F2 for <radext@ietf.org>; Mon, 18 Mar 2024 19:16:05 -0700 (PDT)
Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-33ed7ef0ae8so1630170f8f.0 for <radext@ietf.org>; Mon, 18 Mar 2024 19:16:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=radiatorsoftware-com.20230601.gappssmtp.com; s=20230601; t=1710814563; x=1711419363; darn=ietf.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=WwLDz8Ky7xY7YRYvEvStKoSGyFaEirt2gQqB6CvRNlg=; b=PVLd+4mF2oKH++qUCzDJF7X9ORYjaffaHh/kTB1LK9C+A9wFqd1IsJLYh9avwDrr+i 0cySxqSMmGBm3CZbV7gWcQ7/mOo1bvK8oNNmaGbFFHh30dKc3x2e7jiQx5Lok1eScgZo YgErQwwE+vXFhrgIR7j6Bi8S6wPL40H/zVP5N+YcRuw6Io/dJA5OVF4M6mdP1ZCsKb8v uTZPgTFT3KNYG5bYnfnwAqBomjYh80pJPumW7jotbyEWhBtj9WQwsSr6UGY6itTTpIja SNfBEqqe2eWjuQV1XhME8FEZ9eBRFyGaMwa7bQrHgwyHd/Z4I+clB4kl5Yh68V1UMxSj cdoQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710814563; x=1711419363; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WwLDz8Ky7xY7YRYvEvStKoSGyFaEirt2gQqB6CvRNlg=; b=iBG6PzBZJ/ingRqfq9XjdvbFxpE5K0vYIVtptOSuxXBb2jHUQHYjhPQcb/Rl0csOEw 5Mu3Vyawl5PKQpcE0MgkXJlR1uIyNj6mxMpg6yzIeNyraBHxGJJiGdTvqF2ZfrAFY1Ys UrWzSAS9VdbRB9um08S2FMiwTeJciEobW/+dwFFcaMuEnwN/aDbIkOqHOTWfsMLfqNF7 A6GG8kSMBF7A1OMmrFk96el2NnRSZd6jggZA3B2W27xUDPnZrZ1fnVy19DJiNqMUGDjU O0IrmBRkuPTNDeSH/xB5VIdpvqkBbVQ9UD7K+vS0RVksLsx3VtDS3p3bpHNedZd8WXrg fxWg==
X-Gm-Message-State: AOJu0YztKb735idFTAmpUbpJs1qv0himez0uqgJUNOd4HILjUwFplMJy blT+1cabVGmAw76J0FyCN5GwXoORtByyvyywT79VJxovdEqbrVOlc+tyaeDqND/Fb0KEYkByNnG CkMFPa3xKpRj4cBcFZEsjmUFVm51vZUanDkJqQbvzjRdV3OBrmw==
X-Google-Smtp-Source: AGHT+IEb59GvSF1Tyrc4jBVAE8E+smPPkRddcMVsisrGZRLffnEV2Hld+x173wQlt4QJjU1zoxEEpBb3h6rNKvD6A0I=
X-Received: by 2002:adf:e803:0:b0:341:8388:31b1 with SMTP id o3-20020adfe803000000b00341838831b1mr879752wrm.67.1710814563521; Mon, 18 Mar 2024 19:16:03 -0700 (PDT)
MIME-Version: 1.0
From: Heikki Vatiainen <hvn@radiatorsoftware.com>
Date: Tue, 19 Mar 2024 12:15:46 +1000
Message-ID: <CAA7Lko9tyzPDAhi83ij0ZkKPwt=g_yFXAKyV6QYEs60nAx2_qA@mail.gmail.com>
To: radext@ietf.org
Content-Type: multipart/alternative; boundary="00000000000055f3cc0613fa0e29"
Archived-At: <https://mailarchive.ietf.org/arch/msg/radext/EQnHa5UT5qqGsyMTRE9Nf1v5sYU>
Subject: [radext] PSK identity encoding in Radius TLS-PSK
X-BeenThere: radext@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: RADIUS EXTensions working group discussion list <radext.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/radext>, <mailto:radext-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/radext/>
List-Post: <mailto:radext@ietf.org>
List-Help: <mailto:radext-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/radext>, <mailto:radext-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Mar 2024 02:16:14 -0000

draft-ietf-radext-tls-psk-09 currently states:
https://www.ietf.org/archive/id/draft-ietf-radext-tls-psk-09.html#section-4.2-9

   3. When the server issues session tickets for resumption, the server
ensures that they are not valid UTF-8.
   4. One way to do this is to use stateless resumption with a forced
non-UTF-8 key_name per [RFC5077], Section 4, such as by setting one octet
to 0x00.
   5. When receiving TLS, the server receives Client-Hello containing a
PSK, and checks if the identity is valid UTF-8

UTF-8 encoding of ASCII NUL (an octet with all bits set to zero) is 0x00.
Therefore the above steps seem suspect. 0x00 is valid UTF-8.
https://en.wikipedia.org/wiki/Null_character#Encoding

In general, binary data put through a UTF-8 decode may return success even
when the binary data didn't originate from a UTF-8 encode call. A remainder
in the sample validation flow would be useful.

-- 
Heikki Vatiainen
hvn@radiatorsoftware.com