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

Laurence Lundblade <lgl@island-resort.com> Tue, 01 September 2026 06:39 UTC

Return-Path: <lgl@island-resort.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 118C2132D6688 for <cbor@mail2.ietf.org>; Mon, 31 Aug 2026 23:39:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1788244797; bh=fcMt3C48YLki9Q9vGzIzNXHKMvQxq6L9ccNzvlXr3+A=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=HJjamrIxlzs+Pa7MCIzKJKLVeQ8JuIXibREUqHfKIOvsxx484doat6UsbnPxzmcBW GT6As/Q78V9I26AjpUEF/LoxBdZudUsUAeXjK3f4ae5xlNjhn5cZj2DrvLH8p6j8s2 rzlu6MNrpNOegWKOyxZabbX2L9LWhGsg27O7xrQY=
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -1.698
X-Spam-Level:
X-Spam-Status: No, score=-1.698 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=neutral reason="invalid (public key: not available)" header.d=island-resort.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 SFQI9RlPAA0d for <cbor@mail2.ietf.org>; Mon, 31 Aug 2026 23:39:56 -0700 (PDT)
Received: from sender5-pp-f112.zoho.com (sender5-pp-f112.zoho.com [165.173.182.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 4EBCB132D6684 for <cbor@ietf.org>; Mon, 31 Aug 2026 23:39:56 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1788244782; cv=none; d=zohomail.com; s=zohoarc; b=ZpxYebJR0yH5gOjWVT3nzCGubXIDNwmcg9/X0JkhTQWhuiqN07rSaY3LSeCquzpWlLFDItQYE9AtXkqmwj0MnKcPWteEJ4Mcpk059JbRMRH4AZ48sMaqCqZagP10wAKdGGUZoM75A5T7wrWVeF3Q9DBuqoo1q+GUEcGzVQn8Juc=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1788244782; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=1hlkfha/fADUqJAvRS9my4pPpw6OeWCzG5eCjUu1mkc=; b=RBDAfvBgLBkusSkT5sITY+3x+s60Br6k5CMG8PcmXhB1jS37mZ90PYw5VCjv4Eh5NKSHzqK8hrELTfSsYuQXu4D8Pq8sAG+eXHdHfItV4odJ1HGbVwRvZFBpcq7I5SZaW3Vdqnp6XKNCvxf1D6kGXT4Yg10OfJoU8ORK7nrqkp8=
ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=island-resort.com; spf=pass smtp.mailfrom=lgl@island-resort.com; dmarc=pass header.from=<lgl@island-resort.com>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1788244782; s=island; d=island-resort.com; i=lgl@island-resort.com; h=Content-Type:Mime-Version:Subject:Subject:From:From:In-Reply-To:Date:Date:Cc:Cc:Content-Transfer-Encoding:Message-Id:Message-Id:To:To:Reply-To; bh=1hlkfha/fADUqJAvRS9my4pPpw6OeWCzG5eCjUu1mkc=; b=JDnGEb01GF2hdkUzjrzsnYkNKHCWMG1KTLDDDaJd6JGXWz19zRtt3iGmxGhP2jm9 gpEB4z2T0LIZKC1Q6XlgkuxbHVzVFABVWTQhWLneMd6oMWiNu6L5ZzePGTHf5WiBGz5 FR1XN24zPt8nJg3iFRYCV9QmkrsIo9bRcHzJ3yoY=
Received: by mx.zohomail.com with SMTPS id 1788244780434155.23283761922664; Mon, 31 Aug 2026 23:39:40 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.8\))
From: Laurence Lundblade <lgl@island-resort.com>
In-Reply-To: <30464fd3-a635-46ec-b276-c8a7e874f126@gmail.com>
Date: Mon, 31 Aug 2026 23:39:28 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <A6570221-31E5-4EEB-97A3-60660B4F0034@island-resort.com>
References: <CALaySJJa=QjUM5B6d8boiFb8qyRwf6LO32WVVWBGuCWtSmEFCQ@mail.gmail.com> <876653A4-6425-45E1-A77A-F0A6A1315BDD@cursive.net> <7D242660-39F1-4CC0-A0F3-45A37DD3B448@island-resort.com> <30464fd3-a635-46ec-b276-c8a7e874f126@gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
X-Mailer: Apple Mail (2.3826.700.81.1.8)
X-ZohoMailClient: External
Message-ID-Hash: 7Y2J24FFHUUJFKF5YF3B5OERLDGUIZ3W
X-Message-ID-Hash: 7Y2J24FFHUUJFKF5YF3B5OERLDGUIZ3W
X-MailFrom: lgl@island-resort.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: Joe Hildebrand <hildjj@cursive.net>, 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/rieniaiQ1VingM-qU1WZgHIQLtQ>
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>

I think RFC 8949 presents the idea of a [Generic Decoder] that accepts all serializations, but never a checking decoder. A checking decoder in RFC 8949 would be for either preferred serialization or [Section 4.2.1 deterministic].

It’s fine for something new and narrow like dCBOR or CBOR::Core to say that all decoders are checking decoders.

In theory, we could say that all preferred-plus and deterministic decoders must be checking decoders. In a way, it would be simpler to understand because the difference, which is subtle, would be eliminated. We would not be having this discussion at all.

I’ve not gone that direction because it is less aligned with RFC 8949, preferred serialization, and most decoder implementations. For example, most will accept all five serializations of the integer 1. A checking decoder for deterministic also adds a fair bit of code (on a constrained device) to check the sort order. 

LL

[Generic Decoder]: https://www.rfc-editor.org/rfc/rfc8949.html#name-generic-encoders-and-decode
[[Section 4.2.1 deterministic]: https://www.rfc-editor.org/rfc/rfc8949.html#name-core-deterministic-encoding



> On Aug 31, 2026, at 11:08 PM, Anders Rundgren <anders.rundgren.net@gmail.com> wrote:
> 
> 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
> 
> _______________________________________________
> CBOR mailing list -- cbor@ietf.org
> To unsubscribe send an email to cbor-leave@ietf.org