[Ohai] Re: Chunked OHTTP with zero-length chunks
Martin Thomson <mt@lowentropy.net> Tue, 25 November 2025 23:51 UTC
Return-Path: <mt@lowentropy.net>
X-Original-To: ohai@mail2.ietf.org
Delivered-To: ohai@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 546BB909FA3F for <ohai@mail2.ietf.org>; Tue, 25 Nov 2025 15:51:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.799
X-Spam-Level:
X-Spam-Status: No, score=-2.799 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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=lowentropy.net header.b="1EwOQ8nq"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="jhH8OMW8"
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 8AqUEXqG98Gp for <ohai@mail2.ietf.org>; Tue, 25 Nov 2025 15:51:00 -0800 (PST)
Received: from fout-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149]) (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 C81F9909FA37 for <ohai@ietf.org>; Tue, 25 Nov 2025 15:51:00 -0800 (PST)
Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 4738EEC03A7; Tue, 25 Nov 2025 18:50:54 -0500 (EST)
Received: from phl-imap-15 ([10.202.2.104]) by phl-compute-04.internal (MEProxy); Tue, 25 Nov 2025 18:50:54 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1764114654; x=1764201054; bh=3wRDc+vXU6dlW3/Ua8/jEeUw51ubGY9e BbRD/ocK1Mk=; b=1EwOQ8nqe/vVT1kICDb7n5tPl3kYfj7jvSeDzmUETrMgQr3C PTZO0o2NnTig4PXnZKLqPlvJCdeRNLOjQxiwUV8hYfYXUrFEq5UDRLOdtfjKui/g bDiXq4it7V8mwYTboLuv527H9jFF2KUkD/7dBjQuZkOh72kumsLwWMco/jj+C7yN tL8vhurldjwtFi1CKpWEKYfTiSbDXnXN79giRb3Wdi1xJa1AQRo4jxUUXvWxZ9+h eLS36FZDAsy6OjP27acGuVQHSefJhSw2KDUD8/5oUK74PaXVX4smuk8d/nS2pE07 WbNiw/Qi5pizV/bLVsBVgl+pknioMn13PXluag==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1764114654; x= 1764201054; bh=3wRDc+vXU6dlW3/Ua8/jEeUw51ubGY9eBbRD/ocK1Mk=; b=j hH8OMW8vHvekm/VSbvBCV36gUEaHmBFSq5ipQeL3Tw9Gc+7qJ/Zh+UA+6nAxpbE2 Qus01yP1zyRbtqkrYsivMCLkjg37A+roqMNfVDaaF/QPdFPJuCmZzjqmBP+saX6I 6VEUQzuiB+Xcg95aL1J9NNOlBzuNXGyEp5tWWbhUdFgl32l42mPZOe2zj9Z/vY16 nY84ZTqVJQMc8TR4CeBHgAzdFk4iULC5THMH0uZylmmUg5rOesvt2Zdd8ZCJUmpT wioWDAP3iSCD/psV3z6MuKiKXFvbOXIKoLOtZxW2OjUoYAC9iNAirPpjshZEKrI1 U1j9LUxeJoh6G/JL7rBjQ==
X-ME-Sender: <xms:3UAmaRetTFDmX4LShEfqjC3rs6J9rePp-Lb1hBfHC73cF3WjVjQ3Ew> <xme:3UAmaaAw63LKmyDL4XYc48KeCaLN8oWwJH_T3p8LzV4njPSZFKr0G5-N59YPF7tro uSFoIew3BzKHDoLN-e1X8WKqyJAAmtAJGduToJkMV4o8KhfvDL8MZ8>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvgedvkeefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtqhertdertdejnecuhfhrohhmpedfofgrrhht ihhnucfvhhhomhhsohhnfdcuoehmtheslhhofigvnhhtrhhophihrdhnvghtqeenucggtf frrghtthgvrhhnpefhveeivdetgfegkeeuhedvfffhgefhtedtteduheefleegjeeugedu tddtkeekjeenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhtsehlohifvghnthhrohhphidr nhgvthdpnhgspghrtghpthhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoh epthhprghulhihpeegtdgrphhplhgvrdgtohhmsegumhgrrhgtrdhivghtfhdrohhrghdp rhgtphhtthhopegushgthhhinhgriihirdhivghtfhesghhmrghilhdrtghomhdprhgtph htthhopehohhgrihesihgvthhfrdhorhhgpdhrtghpthhtoheprhhlsgesihhpvhdrshig pdhrtghpthhtoheplhhutggrsheslhhutggrshhprghrughuvgdrtghomh
X-ME-Proxy: <xmx:3UAmaUBExOLSLX2Y-sqrfgwFpIW3FFnItZb5vVe_rEJaUc-AVGxJPw> <xmx:3UAmaYC5g9NsDGFKRgBYpTmhhbw-EdCRr6iu80wgW1n-UwQf1Eb5-A> <xmx:3UAmaXq41J5KebguzrfDhwO4Y4dBv1rinOxE0tzRWF4xlr8kFx88MQ> <xmx:3UAmaamBxJ4HYXojM_KclRqrSaG-basN5QJqMsq4yNDtsJGzM5RRyw> <xmx:3kAmaa2OyKfzAE-oYbkFnh5mKT5XkaPBBkxSXz6haN83WfLIMKwscKb_>
Feedback-ID: ic129442d:Fastmail
Received: by mailuser.phl.internal (Postfix, from userid 501) id C106A780054; Tue, 25 Nov 2025 18:50:53 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
MIME-Version: 1.0
X-ThreadId: ATD81fPvLEzR
Date: Wed, 26 Nov 2025 10:50:33 +1100
From: Martin Thomson <mt@lowentropy.net>
To: Tommy Pauly <tpauly=40apple.com@dmarc.ietf.org>, Lucas Pardue <lucas@lucaspardue.com>
Message-Id: <f50cdef0-18b6-4a90-a6ed-cf9a63aa264c@betaapp.fastmail.com>
In-Reply-To: <41710E3A-F846-4413-A977-B04EE047991D@apple.com>
References: <4f08a9a4-126d-4ac1-99e3-ee81630ae76a@betaapp.fastmail.com> <CAPDSy+5fcZcigqW11jUQUv_WWG=ncn0V3h4k4Ejs4fFi17D9WQ@mail.gmail.com> <CAL02cgS6gPMqiBfG9H-e3TNoyx9kNfqt+ArUmekSHMrND2YWqA@mail.gmail.com> <e8ae0236-97c1-4166-b7f0-f5577cb1dfeb@app.fastmail.com> <41710E3A-F846-4413-A977-B04EE047991D@apple.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Message-ID-Hash: 42RQV57HBUBRDNVX6YLO7SD7LO6QI7OS
X-Message-ID-Hash: 42RQV57HBUBRDNVX6YLO7SD7LO6QI7OS
X-MailFrom: mt@lowentropy.net
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: Richard Barnes <rlb@ipv.sx>, David Schinazi <dschinazi.ietf@gmail.com>, ohai@ietf.org
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Ohai] Re: Chunked OHTTP with zero-length chunks
List-Id: Oblivious HTTP Application Intermediation <ohai.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ohai/T4ummFWvhBbFRH-UcDiC7KI3F58>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ohai>
List-Help: <mailto:ohai-request@ietf.org?subject=help>
List-Owner: <mailto:ohai-owner@ietf.org>
List-Post: <mailto:ohai@ietf.org>
List-Subscribe: <mailto:ohai-join@ietf.org>
List-Unsubscribe: <mailto:ohai-leave@ietf.org>
As for the PR: https://github.com/ietf-wg-ohai/draft-ohai-chunked-ohttp/pull/53 To save you a click, this just adds: +A non-final chunk MUST NOT contain a zero-length plaintext. +A receiver MUST treat the receipt of a chunk that contains no data +as equivalent to a decryption error, +unless that chunk is the final chunk. On Wed, Nov 26, 2025, at 03:23, Tommy Pauly wrote: > The implementation I have for chunked OHTTP already skips sending any > chunks if the content of the chunk is zero-length. So, I’m fine with > this being defined to be strict and prohibit zero-length chunks apart > from the final chunk. > > Tommy > >> On Nov 25, 2025, at 6:52 AM, Lucas Pardue <lucas@lucaspardue.com> wrote: >> >> I don't have an ohttp implementation but agree on the security issues of redundant or confusing encoding and message framing. +1 be strict. >> >> FWIW some of the code I'm responsible for has APIs to prevent sending non-final 0-length DATA frames etc. So this is some familiar territory. >> >> Cheers >> Lucas >> >> On Tue, Nov 25, 2025, at 13:52, Richard Barnes wrote: >>> It is late, but this seems like an important interoperability concern. So let's give this a week or two to confirm there's consensus (say around the strict approach) and then implement. >>> >>> If the authors wanted to draft a PR, that would probably help clarify the discussion. >>> >>> --Richard >>> >>> On Mon, Nov 24, 2025 at 9:07 PM David Schinazi <dschinazi.ietf@gmail.com> wrote: >>>> I would suggest taking the strict approach if the authors of the deployed implementations know they're not sending empty chunks. >>>> >>>> Google's in-progress implementation hasn't shipped yet, and we'll make sure to not send any empty chunks. >>>> >>>> David >>>> >>>> On Mon, Nov 24, 2025 at 5:14 PM Martin Thomson <mt@lowentropy.net> wrote: >>>>> One of the less-nice things about this format is that it is possible to encode a zero-length chunk. That is, a chunk that contains only the AEAD tag, no data. >>>>> >>>>> Discussion on https://github.com/ietf-wg-ohai/draft-ohai-chunked-ohttp/pull/50 indicates that at least two implementations had bugs in this area. Note that typical streaming APIs treat a zero-length return from a read as a stream termination, so this could even be exploited to abuse stacks. >>>>> >>>>> Two choices: >>>>> >>>>> 1. Advise against accepting zero-length chunks, as the above PR does. >>>>> 2. Ban them entirely. Aside from the final chunk, which might need to be empty as stream termination is a separate event from data delivery in many implementations. >>>>> >>>>> I can't think of a reason not to take the stricter approach. But it's very late. >>>>> >>>>> -- >>>>> Ohai mailing list -- ohai@ietf.org >>>>> To unsubscribe send an email to ohai-leave@ietf.org >>>> -- >>>> Ohai mailing list -- ohai@ietf.org >>>> To unsubscribe send an email to ohai-leave@ietf.org >>> -- >>> Ohai mailing list -- ohai@ietf.org >>> To unsubscribe send an email to ohai-leave@ietf.org >>> >> >> -- >> Ohai mailing list -- ohai@ietf.org >> To unsubscribe send an email to ohai-leave@ietf.org > > -- > Ohai mailing list -- ohai@ietf.org > To unsubscribe send an email to ohai-leave@ietf.org
- [Ohai] Chunked OHTTP with zero-length chunks Martin Thomson
- [Ohai] Re: Chunked OHTTP with zero-length chunks David Schinazi
- [Ohai] Re: Chunked OHTTP with zero-length chunks Richard Barnes
- [Ohai] Re: Chunked OHTTP with zero-length chunks Lucas Pardue
- [Ohai] Re: Chunked OHTTP with zero-length chunks Tommy Pauly
- [Ohai] Re: Chunked OHTTP with zero-length chunks Martin Thomson
- [Ohai] Re: Chunked OHTTP with zero-length chunks Tommy Pauly