[Cbor] Re: Working Group Last Call on Serialization draft

Anders Rundgren <anders.rundgren.net@gmail.com> Tue, 01 September 2026 06:08 UTC

Return-Path: <anders.rundgren.net@gmail.com>
X-Original-To: cbor@mail2.ietf.org
Delivered-To: cbor@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id D880D132D1A9A for <cbor@mail2.ietf.org>; Mon, 31 Aug 2026 23:08:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1788242905; bh=NTmS2a6+M85E/c3MiPm3o42Ywj+BPixZoU9FrG9cdmI=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=q7DwUepTjOuwD/KtvwTrC6anMwmxdCn34co7e9swJtIpsaPiqe4PMhjmCWnvd+/kD Hoi/MyL/W4ndrRhO0INZdVrmG3in+iZHaEYk7V/E1oAStB1SQa8jI9feecrdynrcoG ekeYjYSRjEwOmF0WFnCDTmqfynQRQco/H0hfrtVc=
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mSECaqN1TBL9 for <cbor@mail2.ietf.org>; Mon, 31 Aug 2026 23:08:25 -0700 (PDT)
Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 6B717132D1A95 for <cbor@ietf.org>; Mon, 31 Aug 2026 23:08:25 -0700 (PDT)
Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-49b0eab380eso6740645e9.0 for <cbor@ietf.org>; Mon, 31 Aug 2026 23:08:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788242898; x=1788847698; darn=ietf.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Fi67gdJY4c/tXJo2udYOtRouGTqP/2v/3HApfzS+gX8=; b=ixf5otzIPev1dWWu/Mq9i2jfv+Jbs+k9x7E6yvVX5JSypWBnl7cgrdWUAhRYLaxINu IB1ETuPfwvBS7fMa3Jb5L1ihz1aBAbIxzk2CnPHC3N+zkoIR2STngfmQdoQjCy4D3KdX LuGlaCaMgEJRwwSSGKhfcvqgTeD3LV5NZajTVexsLtHPazD2KAL12HDHQILUi/gRF19s sfMZelpTf1qiK4WsiOsyscHAafCmh/ZpePGjFTlBGv/EsPmJ1F5af50tBtclmuPONM9Y e8CdJ0/5MuRxpqJ+7QbGmUsw7R6Angx388GPpZRIpLFNq9Vke/+QAQoUba6BT+EnNeol CArA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788242898; x=1788847698; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Fi67gdJY4c/tXJo2udYOtRouGTqP/2v/3HApfzS+gX8=; b=TepOKz0Hik/EOjDvVrsWiRiLdYnDMwQNG9OOkuvWX8VL0zNGW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WxnFpGxYjJtd0WJnauyC4zu+ffmTgvy22qxnlzCDmbrk=
X-Received: by 2002:a05:600c:3556:b0:495:5d6d:9cc1 with SMTP id 5b1f17b1804b1-49cdd3be8a4mr40681295e9.0.1788242898093; Mon, 31 Aug 2026 23:08:18 -0700 (PDT)
Received: from ?IPV6:2a01:e0a:e1b:64b0:147d:fe78:5e8a:1b17? ([2a01:e0a:e1b:64b0:147d:fe78:5e8a:1b17]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-49cdce0d4f3sm46098575e9.5.2026.08.31.23.08.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Aug 2026 23:08:16 -0700 (PDT)
Message-ID: <30464fd3-a635-46ec-b276-c8a7e874f126@gmail.com>
Date: Tue, 01 Sep 2026 08:08:15 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Laurence Lundblade <lgl@island-resort.com>, Joe Hildebrand <hildjj@cursive.net>
References: <CALaySJJa=QjUM5B6d8boiFb8qyRwf6LO32WVVWBGuCWtSmEFCQ@mail.gmail.com> <876653A4-6425-45E1-A77A-F0A6A1315BDD@cursive.net> <7D242660-39F1-4CC0-A0F3-45A37DD3B448@island-resort.com>
Content-Language: en-US
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <7D242660-39F1-4CC0-A0F3-45A37DD3B448@island-resort.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Message-ID-Hash: GJ6KINGDXE3F243BQLQ3VP4W3STUA35J
X-Message-ID-Hash: GJ6KINGDXE3F243BQLQ3VP4W3STUA35J
X-MailFrom: anders.rundgren.net@gmail.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cbor.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: Barry Leiba <barryleiba@gmail.com>, CBOR Working Group <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Cbor] Re: Working Group Last Call on Serialization draft
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/dxIjhKeJZezgIu0XTBnSEbNMNMI>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Owner: <mailto:cbor-owner@ietf.org>
List-Post: <mailto:cbor@ietf.org>
List-Subscribe: <mailto:cbor-join@ietf.org>
List-Unsubscribe: <mailto:cbor-leave@ietf.org>

On 2026-08-31 22:19, Laurence Lundblade wrote:
> Joe, I don’t quite get what you are after here yet. Which sections are inadequate?
> 
> I am thinking of adding this text to the decoder requirements for both preferred-plus and deterministic:
> 
>     The above requirements are what the decoder MUST accept. A decoder complying to these requirements can also accept other well-formed serializations if it is being liberal in what it accepts. If a decoder chooses to accept only these requirements, then it is a “checking decoder” as described in appendix H.
> 
> I don’t think any CBOR library should default to a checking decoder. It should be a mode that is selectable when and end-end protocol specifies it, or a particular deployment wants it.

This is where it (IMO) gets wrong.  Wolf's dCBOR decoders as well as my CBOR::Core decoders are checking.  In the CBOR::Core case there is also an option for accepting non-deterministically encoded objects, not for being "liberal" à la Postel, but to cope with "legacy" CBOR.

The same goes for non-trivial NaNs.  That non-trival NaNs are permitted in some modes and outlawed in other modes seems like an "opinion". An implementation could (like CBOR::Core), equally well support a common policy for all modes it supports.

However, since the WG seems hellbent on creating "The Ultimate Guide to CBOR Serialization, Library Implementation, and Application/Protocol Design", I guess this is as good as it gets.

Note: these remarks are "for the record" only.  Publishing may proceed.

Anders

> 
> It’s never an input validation security issue. Non-checking decoders must do bullet-proof input validation.
> 
> LL
> 
> 
>> On Aug 18, 2026, at 12:05 PM, Joe Hildebrand <hildjj@cursive.net> wrote:
>>
>> - (most important) Make it clear in each section whether the rules apply to encoders or decoders.
>> - Make it clear that it is up to the protocol designer what to do when decoding inputs that are not in the expected encoding. This is good for protocols where encoding errors (attacks?) might have security consequences.  A couple of examples or criteria could help protocol designers decide.  There is some text in appendix H but it isn't directive enough.
>> - Make a note that even if the protocol designer did not specify that checking should be done, it may make sense to check on inputs on non-constrained devices to increase the likelihood of finding encoding errors before crashing constrained devices.
> 
> 
> _______________________________________________
> CBOR mailing list -- cbor@ietf.org
> To unsubscribe send an email to cbor-leave@ietf.org